A a = new A();
//反射
System.Type type = a.GetType();
//返回方法信息
MethodInfo[] arr = type.GetMethods(BindingFlags.NonPublic|BindingFlags.Instance);
for (var i = 0; i < arr.Length; i++)
{
print(arr[i].Name);
arr[i].Invoke(a, null);
}
MethodInfo method = type.GetMethod("m");
FieldInfo field = type.GetField("b");
int value=(int)field.GetValue(a);
EventInfo e = type.GetEvent("M");
System.Action act = delegate(){ };
//绑定函数
e.AddEventHandler(a, act);