What is the difference between these statements
obj=null and obj.dispose()
Answer Posted / sanjeev
obj=null
when we use obj=null then this object has existence in
memory with no any value.
obj.dispose()
when we use obj.dispose() then the clr release the memory
and there are no any existence of that object into the
memory. so it will be better to use obj.dispose()
Note:- By default it is automatically disposed by the clr
when there are no any references in the left
Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
How many bytes is a char c#?
What is the output of TextWriterTraceListener redirected?
Can we declare class as protected?
What is difference between the "throw" and "throw ex" in .net?
What is sorted list in c#?
What is dataview c#?
What is the difference between do and while loop?
Why do I get a security exception when I try to run my c# app?
Please explain value types and reference types used in c#?
What is the Signification of the "new " keyword in C#? example
List the 5 different access modifiers in c#?
What are the two kinds of properties in c#.
What is using in c#?
What is the use of oops in c#?
What is a console in c#?