标签:ons span get error vat color instance read div
利用反射调用方法
C1 newC1Instance = new C1(); var funM = newC1Instance.GetType().GetMethod("fun", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance); object[] para = { }; if (funM == null) { Console.Write("error, funM is null"); } else funM.Invoke(newC1Instance, para); Console.Read();
public class C1 { private void fun() { Console.Write("C1 fun"); } } public class C2 { public void fun() { Console.Write("c2 fun"); } }
标签:ons span get error vat color instance read div
原文地址:https://www.cnblogs.com/macT/p/11392738.html