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
What does string format do?
Explain About Web.config
What are extender provider components? Explain how to use an extender provider in the project.
Why can't we use a static class instead of singleton?
Enlist the different types of classes in c#?
What is difference between virtual and override in c#?
What is data quality assurance?
What is a custom attribute?
Is enum a class c#?
What is executescalar in c#?
When should you use generics?
How do you use nullable?
What are the properties in c#?
Why do we parse in c#?
Can you declare a field readonly?