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

            l.Add(bar);
        }
Esempio n. 9
0
 public void BarAndFooCouldBeGeneralized(Derived foo, DerivedDerived bar)
 {
     bar.Bar(42, "hash");
     foo.Foo();
 }
Esempio n. 10
0
 public void FooCouldBeBase(Derived foo)
 {
     foo.Foo();
 }