.NET Coding Best Practices -part 4
Doing memory deallocation for unmanaged object is best practices, and we should always put unmanage object creation (objects which are not part of .NET framework like Oracle object, File IO operator, or event heavy computation objects are advised to be put in using block for better memory deallocation for efficient program
Below are the ways of using statements
i. first is common to us
ii. try using second better approach of using, we just add to prefix using in object creation, no need to add braces and enclose code within it, memory will be deallocated when the program will go out of method scope, this feature is available from C# 8 onwards