C# Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 245 Page Views: 

What is the use of the dispose method in C#?



Posted By: Avi Date: 1 October 2010 11:50:31 AM
 Answer:

Dispose() method is called programatically by the user and it is used to de-allocate the unused objects in the application.Basically it will free unmanaged resources.Dispose never removes the object itself from memory. The object will only be removed when the garbage collector finds it convenient. It should be noted that the Dispose method must call GC.SuppressFinalize(this) to prevent the finalizer from running.


Posted By: avibtech


Date: 1 October 2010 11:50:31 AM
Post a better Answer if you have
 
(Will show your Gravatar icon)  
  Country flag

Loading
Enter the text as shown in the image YC232t
Related Questions
C# : In one Try block what is the need of multiple  Catch Blocks?

In one Try block what is the need of multiple Catch Blocks?

If there is one catch block in the try block then it will catch every exception but it will not be c....
Category: C# Date: 10/1/2010 11:35:31 AM
C# : Write the syntax of calling an overloaded constructor within a constructor?

Write the syntax of calling an overloaded constructor within a constructor?

Syntax:- class sum1 { sum1(int count) { } } class sum0 : sum1 { sum0() : sum1(2) // calling bas....
Category: C# Date: 10/1/2010 11:34:31 AM
C# : Write the difference between TypeOf and GetType?

Write the difference between TypeOf and GetType?

Both of them produce the same information. The difference lies that from where the information is go....
Category: C# Date: 10/1/2010 11:33:31 AM
C# : What is Obsolete in C#? How can one make a method obsolete?

What is Obsolete in C#? How can one make a method obsolete?

Obsolete attributemarks the program entity as the one that is not recommended to be used further. Us....
Category: C# Date: 10/1/2010 11:32:31 AM
C# : How are strings compared in C#?

How are strings compared in C#?

Generally , whenever the strings are to be compared using "==" or "!=" operators....
Category: C# Date: 10/1/2010 11:31:31 AM