1.

How Do I Use The 'using' Keyword With Multiple Objects?

Answer»

You can NEST USING statements, like this:
using( OBJ1 )
{
using( obj2 )
{
...
}
}

However consider using this more AESTHETICALLY PLEASING (but functionally identical) formatting:
using( obj1 )
using( obj2 )
{
...
}

You can nest using statements, like this:
using( obj1 )
{
using( obj2 )
{
...
}
}

However consider using this more aesthetically pleasing (but functionally identical) formatting:
using( obj1 )
using( obj2 )
{
...
}



Discussion

No Comment Found