Multiple choice technology programming languages

How do you Dereference an Object in VB.NET

  1. By setting the object to Null

  2. By setting the object to Nothing

  3. With Close keyword

  4. None of the above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In VB.NET, objects are dereferenced and released from memory by setting them to Nothing. This is different from C# and other languages that use null. The Nothing keyword assigns the object reference to null, allowing the garbage collector to reclaim memory.