
'using' statement in block
biondello,
The "using" statement has two uses. It can be used to declare a
namespace or a typedef when placed at the top of the file and used with '#'
placed before it.
In code, however, the using statement is used to handle disposable
objects (those that implement IDisposable) to call IDispose::Dispose when
the block is exited. In this case, you can use it in as many blocks as you
want.
Hope this helps.
--
- Nicholas Paldino [.NET MVP]
Quote:
> Is it possible to have a 'using' statement only inside a block or do I
have
> to declare it for the entire file?