Hi
Just wanna to know objSample.dispose() is equal to objSample = null
Indeed, can I get answer to such these questions from disassemblers? how?
Thank you
Hi
Just wanna to know objSample.dispose() is equal to objSample = null
Indeed, can I get answer to such these questions from disassemblers? how?
Thank you
No, Disposing an object does not mean setting the reference to that object to null.
Disposing is an convention to clean up resources when the programmer wants it, not to wait untill the garbage collector decides to kick in.
To answer your question, write this:
objSample.Dispose();
objSample = null;