.net 内置的一种委托
using System; private Action m_Action; m_Action = Func1; m_Action += Func1; m_Action += Func2; m_Action?.invoke() //获取委托中的Action列表 var actionList = m_Action.getInvocationList(); //委托中是否存在指定的Action var isExit = Array.IndexOf(actionList,(Action)Func1); var isExit = Array.IndexOf(actionList,(Action)Func2); void Func1(){} voi Func2(){}