Hi Guys
Please tell me the "using" Keyword in C#
thanks
Pravesh Singh
Total Post:101
Points:709Total Post:101
Points:709Post:25
Points:175The Using Keyword takes care of freeing the resources automatically associated with the block.
© Copyright © 2010 - 2019 MindStick Software Pvt. Ltd. All Rights Reserved
Post:604
Points:4228Re: The "using" Keyword in C#
hi Pravesh
The reason for the "using" statement is to ensure that the object is always disposed correctly, and it doesn't require explicit code to ensure that this happens.
We can write above code like this