With block equivalent in C#?

.net, c#, vb.net

Solution

This is what Visual C# program manager has to say: Why doesn't C# have a 'with' statement?

Many people, including the C# language designers, believe that 'with' often harms readability, and is more of a curse than a blessing. It is clearer to declare a local variable with a meaningful name, and use that variable to perform multiple operations on a single object, than it is to have a block with a sort of implicit context.

Problem

I know VB.Net and am trying to brush up on my C#. Is there a `With` block equivalent in C#?

Original source

Related problems