private static void multicastExample() { funcType ex = () => Console.WriteLine("Testing FuncType once"); ex += () => Console.WriteLine("Testing FuncType with second function"); ex += () => Console.WriteLine("Testing FuncType with third function"); ex += () => Console.WriteLine("Testing FuncType with fouth function"); ex();//call the delegate object. Delegate instance is more like an alias to Ur function... }
public funcTypeFixed8(funcType funcType = default, array <ptr <rtype> > args = default) { this.m_funcTypeRef = new ptr <funcType>(funcType); this.args = args; }
static void TestFunc(funcType funcName) { Console.WriteLine("UR Implementation"); funcName();//The function will be called inside the TestFunc... Console.WriteLine("Going Back"); }