Hello UweKeim,
Yes, this is possible. Simply add an object of a delegate type:
You can also use a lambda expression to accomplish the same thing:
Good luck!
Yes, this is possible. Simply add an object of a delegate type:
engine.AddHostObject("add", new Func<int, int, int>(delegate(int a, int b) { return a + b; }));
engine.AddHostObject("add", new Func<int, int, int>((a, b) => a + b));