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 do namespaces work?
What is the difference between the debug class and trace class? Documentation looks the same.
What is class sortedlist underneath?
What is difference between abstract class and interface in c#?
How do I create a single-file assembly?
Explain how to parse a datetime string?
Can you inherit multiple abstract classes in c#?
What is the correct way of declaring an xml namespace?
Which are access modifiers available in c#?
Which is executed if an exception has not occurred?
List the 5 different access modifiers in c#?
If multiple interfaces are inherited and they have conflicting method names; What will happen ?
How many types of inheritance are there in c#?
Is c# scripting language?
How to exclude a property from xml serialization?