Hello Abe,

I'm grateful for your help, but this will not work. Among other things
you're getting into an infinite recursion loop calling B.SampleMethod()
from B.SampleMethod()...

Regards,

El 21/11/10 19:49, Abe Gillespie escribió:
> Don't call base in SampleMethod -> this skips your override /
> virtualization.  SampleMethod should be:
>
>         public override void SampleMethod () {
>             SampleMethod();
>             Console.WriteLine (this.BuildString());
>         }
>
> Note that you can also do:
>
> A a = new B();
> a.SampleMethod();
>
> and you'll get B's implementation of SampleMethod.
>
> Good luck.
> -Abe
>   

_______________________________________________
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to