예제 #1
0
 public void FooCouldBeBase(Derived foo)
 {
     foo.Foo();
 }
예제 #2
0
 public void BarAndFooCouldBeGeneralized(Derived foo, DerivedDerived bar)
 {
     bar.Bar(42, "hash");
     foo.Foo();
 }
예제 #3
0
 public void BarAsGeneralizedArgument(string hash, Derived dbar)
 {
     dbar.Foo(); //if bar wasn't used as a Derived argument below it would be eligible
     DerivedBarCouldNotBeGeneralized(dbar);
 }