using uCalcSoftware;

var uc = new uCalc();
// Create a new Expression object with an initial formula.
// This uses the default uCalc instance for context.
var expr = new uCalc.Expression("1 + 1");

// Implicitly calls .EvaluateStr() when used in a string context
Console.WriteLine($"Initial value: {expr}");

// Reassign the expression to a new formula with a simple string assignment.
// This implicitly calls .Parse() behind the scenes.
expr = "10 * (5 + 3)";

// Retrieve the result. For numeric results, you can assign it
// directly to a double. This implicitly calls .Evaluate().
double result = expr;
Console.Write("New value: "); Console.Write(result);