What is the difference between finalize() and dispose()?



What is the difference between finalize() and dispose()?..

Answer / Pervinder Singh

"Finalize() is a method that runs automatically when an object is garbage collected, while Dispose() is a method that developers can call manually to release unmanaged resources before an object is garbage collected. The main difference is control and timing."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

Can arraylist hold primitive types?

1 Answers  


What does the keyword virtual mean in the method definition?

2 Answers  


What is tochararray in c#?

1 Answers  


What are predicates in c#?

1 Answers  


Where do we set the min and max pool size for connection pooling?

1 Answers  


What is difference between hashtable and dictionary in c#?

1 Answers  


If a class is a ref type, how we can pass to a function.

1 Answers   Synechron,


What is the default scope of a class in c#?

1 Answers  


how to handle errors in sqlserver

1 Answers  


What is call back method?

1 Answers  


What Is An Interface Class?

1 Answers   Siebel Systems,


What does assert() do in c#?

1 Answers  


Categories