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 is the difference between proc. Sent by val and by sub?
Are classes passed by reference in c#?
What is the purpose of reserved word using in c#?
Why are local variables stored in stack?
What does the keyword “virtual†declare for a method or property?
What are c# collections?
What is a delegate in c#?
what is a structure in c#
What is difference between array and list?
What is a method signature?
Why do we use 0?
How can you access a private method of a class?
What is difference between dynamic and var in c#?
Explain the Different types of configuration files in .net?
Explain the use of virtual, sealed, override, and abstract method?