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
How to add a readonly property in c#.net
What is the difference between ref and out parameters in c#?
What are the string functions in c#?
Wht executescaler method is used?
Why array is faster than arraylist in c#?
How do you create empty strings in c#?
What are data types examples?
What does typeof return c#?
What is this keyword in C#?
Why are local variables stored in stack?
Can a constructor be static in c#?
What is .net c#?
What is getenumerator?
How is exception handling implemented in c#?
What types of object can I throw as exceptions?