PreferencesStore.Reset Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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());
}