luni, 25 august 2014

using Statement (C#)

using Statement (C#)

Defines a scope, outside of which an object or object will be disposed.
The using statement allows the programmer to specify when objects that use resources should release them.

using (SqlConnection connection = new SqlConnection(connectionString))
{
   connection.Open();
}

Niciun comentariu:

Trimiteți un comentariu