MSDN:
The
using
statement ensures thatDispose
is called even if an exception occurs while you are calling methods on the object. You can achieve the same result by putting the object inside atry
block and then callingDispose
in afinally
block; in fact, this is how theusing
statement is translated by the compiler.