Monday, January 4, 2010

using directive vs using statement :

Create an instance in a using statement to ensure that Dispose is called on the object when the using statement is exited. A using statement can be exited either when the end of the using statement is reached or if foreg an exception is thrown and control leaves the statement block before the end of the statement.

Using directive has two uses:
Create an alias for a namespace.
Permit the use of types in a namespace such that you do not have to qualify the use of a type in that namespace .

1 comment:

Unknown said...

could u emphasize in this...wud help lotta ppl hu follow ur blog.