Menambahkan Layanan Injeksi Ketergantungan di Aplikasi Windows Forms
public class MainForm: Form
{
// ..
private readonly IMySomeThing _mySomething;
public MainForm()
{
_mySomething = (IMySomeThing)Program.ServiceProvider.GetService(typeof(IMySomeThing));
}
}
Doubtful Dog