using uCalcSoftware;

var uc = new uCalc();

static void MyAdd(uCalc.Callback cb) {
   var x = cb.Arg(1);
   var y = cb.Arg(2);
   cb.Return(x + y);
}

// Link the uCalc function 'Add' to the native 'MyAdd' callback.
uc.DefineFunction("Add(x, y)", MyAdd);

// Now the native code can be called from an expression.
Console.WriteLine(uc.Eval("Add(10, 5)"));