private static void RunDelegatsReturnCovar() { //MyDelegateReturn<Ford> delegateDerivedBase = FooArgInBase; MyDelegateReturn <Ford> delegateDerivedDerived = FooArgInDerived; MyDelegateReturn <Car> delegateBaseBase = FooArgInBase; //MyDelegateReturn<Car> delegateBaseBase1 = delegateDerivedDerived; FooTakeDelegateReturn(delegateBaseBase); //FooTakeDelegate(delegateDerivedDerived); MyDelegateReturn <Car> delegateBaseDerived = FooArgInDerived; //MyDelegateReturnOut<Ford> delegateOutDerivedBase = FooArgInBase; MyDelegateReturnOut <Ford> delegateOutDerivedDerived = FooArgInDerived; MyDelegateReturnOut <Car> delegateOutBaseBase = FooArgInBase; MyDelegateReturnOut <Car> delegateOutBaseBase1 = delegateOutDerivedDerived; FooTakeDelegateReturnOut(delegateOutBaseBase); FooTakeDelegateReturnOut(delegateOutDerivedDerived); MyDelegateReturnOut <Car> delegateOutBaseDerived = FooArgInDerived; Car a = delegateOutBaseDerived(); }
private static void FooTakeDelegateReturnOut(MyDelegateReturnOut <Car> foo) { }