回调的英文定义: A callback is a function that is passed as an argument to another function and is executed after its parent function has completed. 字面上的理解,回调函数就是一个参数,将这个函数作为参数传到另一个函数里面,当那个函数执行完之后,再执行传进去的这个函数.这个过程就叫做回调. 其实也很好理解对吧,回调,回调,就是回头调用的意思.主函数的事先干完,回头再…
using System; namespace CallBackTest{ class Program //用户层,执行输入等操作 { static void Main(string[] args) { CalculateClass cc = new CalculateClass(); FunctionClass fc = new FunctionClass(); int result1 = cc.PrintAndCalculate(2, 3, fc.GetSum); Console.Write…