public BinaryRegistersOperationInstruction Setup(BinaryOperationDelegate func, Byte r0, Byte r1) { _func = func; _r0 = r0; _r1 = r1; return(this); }
public static void Main(string[] args) { int res1 = OperateV1(2, 3, '+'); int res2 = OperateV2(2, 3, new AddOper()); BinaryOperationDelegate boAdd = new BinaryOperationDelegate(Add); int res = OperateV3(2, 3, boAdd); boAdd(5, 6); }
private static int OperateV3(int v1, int v2, BinaryOperationDelegate del) { return(del(v1, v2)); }