G
Guest
I have the need to destory the current object when a method is called. Such
as:
public class Animal{
public string animalType = string.Empty;
public void Delete(){
this = null;
}
}
When I compile it, it throws an error. Is this not possible? I know the
user of class Animal can set it to null on his own, but was hoping I could do
this.
-AC
as:
public class Animal{
public string animalType = string.Empty;
public void Delete(){
this = null;
}
}
When I compile it, it throws an error. Is this not possible? I know the
user of class Animal can set it to null on his own, but was hoping I could do
this.
-AC