dispose method

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: R.A. (temp_at_citsecure.com)
Date: 03/24/04


Date: Wed, 24 Mar 2004 13:37:38 -0600

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



Relevant Pages

  • Re: General Network Error
    ... Thanks michel, if I use smart client design, Should I use asp.net to build ... Can you recommend any web sist talking about smart Client? ... > a connection ... >> to reduce cost and move the MS SQL server to china 's data centre. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Error "SQL Server does not allow remote connections"
    ... The application could not connect to the sql server db. ... network is blocking the connection. ... SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 ... integratedSecurity, SqlConnection owningObject) +737554 ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: OT: Why welfare doesnt work!
    ... I have never reported anyone to the FBI, ... He mentioned things from the 'Model T' era of IC design. ... connector on the high voltage connection to the cathode. ... adjust the temperature. ...
    (sci.electronics.design)
  • Re: How to handle concurrency issue with better performance?
    ... Hitchhiker's Guide to Visual Studio and SQL Server ... Then for timestamp, it will be unique? ... Collisions occur because your design permits ... select command). ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Connection from remote computer to network SQL Server
    ... There is no firewall on the W2K machine acting as the SQL server. ... I tried making the SQL machine a "trusted" on the router. ... connection works. ... To find the IP address of your computer inside the network, ...
    (microsoft.public.access.adp.sqlserver)