using uCalcSoftware; var uc = new uCalc(); // Create two completely separate uCalc instances. var uc1 = new uCalc(); uc1.DefineVariable("x = 100"); var uc2 = new uCalc(); uc2.DefineVariable("x = 200"); // Get the DataType for 'Int' from the *first* instance. var intType_from_uc1 = uc1.DataTypeOf("Int"); // Use the .uCalc() method to get the parent instance. // This should be uc1, so evaluating 'x' should yield 100. var parent = intType_from_uc1.uCalc; Console.WriteLine($"Parent of intType_from_uc1 evaluates 'x' to: {parent.Eval("x")}"); // Get the DataType for 'Int' from the *second* instance. var intType_from_uc2 = uc2.DataTypeOf("Int"); // This should be uc2, so evaluating 'x' should yield 200. parent = intType_from_uc2.uCalc; Console.WriteLine($"Parent of intType_from_uc2 evaluates 'x' to: {parent.Eval("x")}");