vb.net - Nested using statements -


As Eric Gunnersson shows in the blog post, in C # you can use Nest As statements:

  (StreamWriter w1 = File.CreateText ("W1")) (StreamWriter w2 = File.CreateText ("W2")) {// code here}  

Is there a similar way to do this in VBnet? I want to avoid many indentation levels.

like this:

  as new cheating Using, using new alignment () ... as the _b  

Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -