C# - Erase all property values from a class?

Posted by John M on Stack Overflow See other posts from Stack Overflow or by John M
Published on 2010-04-05T20:57:22Z Indexed on 2010/04/05 21:03 UTC
Read the original article Hit count: 187

Filed under:
|
|
|

In a C# Winforms (3.5) application I have added a class that contains many properties (get/set) used to stored values from a 12 form long process.

After form 12 I would like wipe out all the property values in the storing class so that the next user won't accidentally record values when starting the process at form 1.

Is it possible to erase/destroy/dispose of all property values in a class?

My class looks like this:

private static int battery;
    public int Battery
    {
        get { return storeInspectionValues.battery; }
        set { storeInspectionValues.battery = value; }
    }

© Stack Overflow or respective owner

Related posts about c#

Related posts about winforms