Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() '// Create two completely separate uCalc instances. Dim uc1 As New uCalc() uc1.DefineVariable("x = 100") Dim uc2 As New uCalc() uc2.DefineVariable("x = 200") '// Get the DataType for 'Int' from the *first* instance. Dim 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. Dim 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. Dim 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")}") End Sub End Module