Instantiate class with context

36 views Asked by At

I have a simple class (that not inehited from IDisposable), that has some simple methods.

For access it, I do this:

var object= new class();

I saw in another code, one different way to instantiate:

var object= new class();
{

//do somenthing

}

what the curly braces do in this context ?

0

There are 0 answers