How to Dispose an Object?

 Posted by vishalneeraj-24503 on 12/26/2013 | Category: C# Interview questions | Views: 991 | Points: 40
Answer:

We can Dispose an object by doing Null or calling its Dispose() method.

For Example:-

DataSet ds = New DataSet(); //initialise a dataset object.

ds = null; //dispose

//or

ds.Dispose();//dispose


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response