Hello,
What is the right way to delete an object I do not need to use anymore ?
is the next line right only in VB6 ?
myObj = nothing

thank you

No, that is correct even in VB.NET.
That being said, if the object contains a Dispose method, then you should do myObj.Dispose() before assigning it to Nothing.

use objname.dispose()

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.