What is the difference between these statements
obj=null and obj.dispose()

Answer Posted / pushparaj pentakota

obj=null is remove the reference to object only but that
object will be existed but obj.dispose() is clear the
reference and as well as clear the object also from the
memory.so obj.dispose() is best to use but in some cases not.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is c# queue thread safe?

737


What is ilasm.exe used for?

708


Are c# strings immutable?

706


Is there regular expression (regex) support available to c# developers?

758


Define assert() method? How does it work?

855


Explain copy constructor?

906


What is a partial class in c#?

702


What is ado c#?

758


Illustrate the differences between the system.array.copyto() and system.array.clone()?

736


Explain the 3 types of properties in c# with an example?

761


What is the difference between add and addrange in c#?

793


Why do we use overloading in c#?

721


What is Dependency of Injection?

738


What does using system mean in c#?

744


Explain About multi level and multiple inheritance how to achieve in .net

820