What is the difference between these statements
obj=null and obj.dispose()
Answer Posted / dhinaharan
obj.dispose has to be used and not obj=null, bcoz JIT
compiler is optimizing compiler, and setting a local
variable or parameter to null is the same as not
referencing the variable at all.
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What are cshtml files?
What are the types of class in c#?
what is generics? can u explain 5 to 6 examples on generics that covers class,method,structure,list,delegates?
How can we set the class to be inherited, but prevent the method from being over-ridden?
How do you implement thread synchronization in c#?
What is nullable types in c#?
How do I start a program in c#?
Why do we need serialization?
What is hashtable in c# with example?
What is the default value of guid in c#?
What is the difference between list and arraylist c#?
What is parallel foreach in c#?
What is the solution if you need to manipulate sets of items?
Should I make my destructor virtual?
What is string [] args in c#?