Пример #1
0
 public void Stfld2(DerivedDerived bar)
 {
     derived = bar;//no warn since we use specific below
     bar.DerivedDerivedSpecific();
 }
Пример #2
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);
 }
Пример #3
0
 public void Stfld(Derived bar)
 {
     derived = bar;
 }
Пример #4
0
 public void DerivedBarCouldNotBeGeneralized(Derived bar)
 {
     bar.Bar(0, string.Empty);
 }
Пример #5
0
 public int BarAndFooCouldNotBeGeneralized(string foo, Derived bar)
 {
     bar.Bar(foo.Length, foo);
     return(0);
 }
Пример #6
0
 public void Stsfld(DerivedDerived bar)
 {
     sderived = bar;
 }
Пример #7
0
 //`bar` could be Base
 public DerivedDerived Constructor(Derived bar)
 {
     return(new DerivedDerived(bar));
 }
Пример #8
0
        //`bar` could be Base
        public void GenericAddBar(Derived bar)
        {
            List <Base> l = new List <Base>();

            l.Add(bar);
        }
Пример #9
0
 public void BarAndFooCouldBeGeneralized(Derived foo, DerivedDerived bar)
 {
     bar.Bar(42, "hash");
     foo.Foo();
 }
Пример #10
0
 public void FooCouldBeBase(Derived foo)
 {
     foo.Foo();
 }