That is nothing like the "with" statement. It is simply a mechanism for
ensuring that an instance is disposed.
--
HTH,
Kevin Spencer
Microsoft MVP
Professional Numbskull
Hard work is a medication for which
there is no placebo.
"Neil Stevens" <ne**********@traveltrust.co.uk> wrote in message
news:un**************@TK2MSFTNGP04.phx.gbl...
In C# you can use the using keyword as follows
MyObject object = new MyObject();
using (object)
{
...
}
or.....
using (MyObject object = new MyObject())
{
...
}
"Jazer" <jo*************@gmail.com> wrote in message
news:Ow**************@TK2MSFTNGP02.phx.gbl...
Hi,
In many other programming languages is construction with.
with <object_name> do
begin
...
end.
Is there something similar in c#?