public static void DelegatesDynamicDispatch2_NoBugs() { FoxTerrier d = new FoxTerrier(); d.Eat(); Contract.Assert(Dog.Execute(d.Eat) == 2); }
public static void DelegatesDynamicDispatch4_Bugged() { AiredaleTerrier d1 = new AiredaleTerrier(); FoxTerrier d2 = new FoxTerrier(); DelegateDogAction a1 = d1.Run; DelegateDogAction a2 = d2.Run; a1(); }