I am trying to create a method that looks like the following when used:
Dialog (var d = new MyDialog())
{
d.DoSomethingToAVisibleDialogThatAppearedInTheDialog(); //Call
}
Like “using”, it would handle the destructor, but I want to add more stuff to Dialog, which would handle my IDialog interface.
You could created a class like the following:
And then use it like so: