using uCalcSoftware; var uc = new uCalc(); // Create two independent uCalc instances var uc1 = new uCalc(); var uc2 = new uCalc(); // Define a variable 'x' in each instance with a different value var itemX1 = uc1.DefineVariable("x = 100"); var itemX2 = uc2.DefineVariable("x = 200"); // Use the item to get its parent context and evaluate 'x * 2' // This correctly uses uc1's context where x is 100. Console.WriteLine($"Context 1: {itemX1.uCalc.Eval("x * 2")}"); // This correctly uses uc2's context where x is 200. Console.WriteLine($"Context 2: {itemX2.uCalc.Eval("x * 2")}"); // Clean up the instances uc1.Release(); uc2.Release();