Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# delete object

Sample x = new Sample();
x.value = "Some Value";
// set object to null == "deleting" the object
x = null;
// this is going to throw a "NullReference" Exeption:
Console.WriteLine(x.value);
Source by www.delftstack.com #
 
PREVIOUS NEXT
Tagged: #delete #object
ADD COMMENT
Topic
Name
3+5 =