I knew we could create more than one instance of the same type in a using block! but is there a way i could have different types instances nested or written in a single using block?
i just read this, so far it seems the only option
http://blogs.msdn.com/b/ericgu/archive/2004/08/05/209267.aspx
It’s not possible to have variables of different declared types in the same using statement. The C# spec limits the set of valid constructs to a single expression or a local variable declaration. The latter is covered in section 8.5.1 of the C# lang spec and only provides for a single variable type
To support different local variable types you need to use some form of nesting. For example