I have a class that has objects and members. After a successful operation, I want to reset all the members of the class. Is there a way to achieve this without writing a for loop? I cannot set the class object to null, as it will break processing downstream.
for( var member in this.myService)
{
member = "";
}
But when it encounters another object it fails. I will have to go through the members of that object, instead of that is there a way to reset all the members that belong in this class to "". Most members are strings, and the inner objects members are also string.