Monday, December 9, 2019

Purpose of USING Keyword IN C#

  1. Using as directive in C# can be used for importing namespaces to your classes.
  2. Using block: If u declare any un-managed object in using block, u don't need to explicitely dispose those object.once the block execution is over, the Dispose will be called automatically.

OR


All variables you use in Using Block gets disposed when you exit the Using Block.

No comments:

Post a Comment