using uCalcSoftware; var uc = new uCalc(); // Check initial state (Root instance only) Console.WriteLine(uCalc.DefaultCount); // Push the current 'uc' instance onto the stack uc.IsDefault = true; Console.WriteLine(uCalc.DefaultCount); // Create a new instance and push it var ucB = new uCalc(); ucB.IsDefault = true; Console.WriteLine(uCalc.DefaultCount); // Create another instance and push it var ucC = new uCalc(); ucC.IsDefault = true; Console.WriteLine(uCalc.DefaultCount); // Clear all custom defaults, reverting to the root instance uCalc.DefaultClear(); Console.WriteLine(uCalc.DefaultCount);