Raed Sawalha <(E-Mail Removed)> ha scritto:
> I have a SqlConnection object , Dose calling Dispose() in
> SqlConnection Object close the opened connection to database?
Yes. With reflection you an read the method Diponse in SqlConnection class:
protected override void Dispose(bool disposing)
{
if (disposing)
{
switch (this._objectState)
{
case ConnectionState.Open:
{
this.Close();
break;
}
}
this._constr = null;
}
base.Dispose(disposing);
}
--
AZ [Microsoft - .NET MVP]
Mia Home page:
http://ciclismo.sitiasp.it
Asp.Net community:
http://www.aspitalia.com
Il mio blog:
http://blogs.aspitalia.com/az