R
R.A.
Hi
IF I design a class and would like to be able to call the class distructor,
how can I do it in c#? Is that the propose of the dispose? What I need to do
is in my class I connect to sql server and the user can call the close
method of my class which will close the connection to the server. But in
case they forgot to the close then if they call the class destructor then
the connection will be closed (in c++). So how can I do it in c#?
Thanks
IF I design a class and would like to be able to call the class distructor,
how can I do it in c#? Is that the propose of the dispose? What I need to do
is in my class I connect to sql server and the user can call the close
method of my class which will close the connection to the server. But in
case they forgot to the close then if they call the class destructor then
the connection will be closed (in c++). So how can I do it in c#?
Thanks