Interviews3 answers
What is the purpose of using statement in C#?
3 Answers
Provides a convenient syntax that ensures the correct use of IDisposable objects.
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/using-statement
Shivam ShuklaPosted Jun 27, 2018, 8:34 PM EDT
using helps to automatically dispose data once you are out of loop and is preferred rather than explicitly opening and closing connections of object.
SYNTAX
using ()
{
}
Afshan KhanPosted Feb 23, 2018, 12:45 AM EST
using keyword is used to include a namespace in the program. A program generally has multiple using statements.
Bhuvanesh MohankumarPosted May 8, 2016, 9:32 AM EDT

