public void PosTest6() { TestClass tc = new TestClass(); Type tpA = tc.GetType(); EventInfo eventinfo = tpA.GetEvent("Event3", BindingFlags.NonPublic | BindingFlags.Instance); MethodInfo methodinfo = eventinfo.GetRaiseMethod(false); Assert.Null(methodinfo); }
public void PosTest2() { TestClass tc = new TestClass(); Type tpA = tc.GetType(); EventInfo eventinfo = tpA.GetEvent("Event1"); MethodInfo methodinfo = eventinfo.GetRaiseMethod(false); Assert.Null(methodinfo); }