Share via


PreferencesStore.Reset Method

Definition

Deletes the preference store.

public:
 void Reset();
public void Reset ();
member this.Reset : unit -> unit
Public Sub Reset ()

Examples

The following example writes preference store information to the trace listener before and after calling the Reset method.

void TrcVal(string name, int defVal) {

    PreferencesStore store = MyPrefStore;

    bool b = store.ContainsValue(name);
    if (b == false)
        Trace.WriteLine(name + " is not in store");


    int intVal = store.GetValue(name, defVal);
    Trace.WriteLine(name + " Value = "
        + intVal.ToString());

}
void TrcResetTst(string name) {

    PreferencesStore store = MyPrefStore;
    Trace.WriteLine("IsEmpty : " + store.IsEmpty.ToString());

    bool b = store.ContainsValue(name);
    Trace.WriteLine("ContainsValue(\"" + name + "\") : "
        + b.ToString());

}

Applies to