C# Using Keyword¶
Overview¶
The using
keyword is used in the following 3 scenarios:
- The using statement -- to ensure the IDisposible object is properly disposed
- The using declaration -- to ensure the IDisposible object is properly disposed (C# 8)
- The using directive -- to allow user to use types defined in a namespace without specifying the fully qualified namespace of that type.
Reference¶
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/using