Click here to Skip to main content
15,907,497 members
Home / Discussions / C#
   

C#

 
JokeRe: Implementing IDisposable in Sealed class Pin
Paul Conrad17-Aug-08 9:45
professionalPaul Conrad17-Aug-08 9:45 
GeneralRe: Implementing IDisposable in Sealed class Pin
Scott Dorman17-Aug-08 17:54
professionalScott Dorman17-Aug-08 17:54 
GeneralRe: Implementing IDisposable in Sealed class Pin
Scott Dorman17-Aug-08 17:51
professionalScott Dorman17-Aug-08 17:51 
GeneralRe: Implementing IDisposable in Sealed class Pin
N a v a n e e t h17-Aug-08 4:27
N a v a n e e t h17-Aug-08 4:27 
GeneralRe: Implementing IDisposable in Sealed class Pin
Blumen17-Aug-08 4:32
Blumen17-Aug-08 4:32 
GeneralRe: Implementing IDisposable in Sealed class Pin
Scott Dorman17-Aug-08 17:49
professionalScott Dorman17-Aug-08 17:49 
AnswerRe: Implementing IDisposable in Sealed class Pin
Scott Dorman17-Aug-08 17:48
professionalScott Dorman17-Aug-08 17:48 
GeneralRe: Implementing IDisposable in Sealed class Pin
Blumen18-Aug-08 0:55
Blumen18-Aug-08 0:55 
The reason why I thought of sealing my Data Access class in the first place is because it is not meant to be a base class. It just contains a few Methods calls that fetch data from database or write/edit data (queries basically).

Thanks to all who have replied to my query here. I hope this code is correct:
public sealed class CustomerDal:IDisposable
{
  SqlConnection connection;
  SqlCommand command;
  
  public void Dispose()
  {
     // Free any managed resources in this section 
       if (connection != null)
          connection.Dispose();

       if (command != null)
          command.Dispose();            
  }
    //My Methods go here..  
}

Could anyone point me to a resource where I can find a DAL class which is provider independent, which supports transaction as well in C# 2.0?

Regards,
Blumen
GeneralRe: Implementing IDisposable in Sealed class Pin
Pete O'Hanlon18-Aug-08 2:41
mvePete O'Hanlon18-Aug-08 2:41 
GeneralRe: Implementing IDisposable in Sealed class Pin
Blumen18-Aug-08 18:45
Blumen18-Aug-08 18:45 
QuestionHow to know wheter a string contains a url? Pin
Waleed Eissa16-Aug-08 23:54
Waleed Eissa16-Aug-08 23:54 
AnswerRe: How to know wheter a string contains a url? Pin
Manas Bhardwaj17-Aug-08 0:04
professionalManas Bhardwaj17-Aug-08 0:04 
GeneralRe: How to know wheter a string contains a url? Pin
Waleed Eissa17-Aug-08 1:37
Waleed Eissa17-Aug-08 1:37 
AnswerRe: How to know wheter a string contains a url? Pin
Christian Graus17-Aug-08 0:52
protectorChristian Graus17-Aug-08 0:52 
GeneralRe: How to know wheter a string contains a url? Pin
Waleed Eissa17-Aug-08 1:42
Waleed Eissa17-Aug-08 1:42 
GeneralRe: How to know wheter a string contains a url? Pin
Christian Graus17-Aug-08 2:06
protectorChristian Graus17-Aug-08 2:06 
GeneralRe: How to know wheter a string contains a url? [modified] Pin
Waleed Eissa17-Aug-08 3:34
Waleed Eissa17-Aug-08 3:34 
GeneralRe: How to know wheter a string contains a url? Pin
Manas Bhardwaj18-Aug-08 6:15
professionalManas Bhardwaj18-Aug-08 6:15 
GeneralRe: How to know wheter a string contains a url? Pin
Waleed Eissa18-Aug-08 13:49
Waleed Eissa18-Aug-08 13:49 
AnswerRe: How to know wheter a string contains a url? Pin
Paul Conrad17-Aug-08 8:12
professionalPaul Conrad17-Aug-08 8:12 
GeneralRe: How to know wheter a string contains a url? Pin
Waleed Eissa17-Aug-08 17:31
Waleed Eissa17-Aug-08 17:31 
QuestionNew Extention Pin
hadad16-Aug-08 22:15
hadad16-Aug-08 22:15 
AnswerRe: New Extention Pin
Wendelius16-Aug-08 23:12
mentorWendelius16-Aug-08 23:12 
GeneralRe: New Extention Pin
hadad16-Aug-08 23:19
hadad16-Aug-08 23:19 
GeneralRe: New Extention Pin
Wendelius16-Aug-08 23:30
mentorWendelius16-Aug-08 23:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.