In this case, I came across a corner case, taking into account the difference with the scope of the methods / properties of the instance in C #. Here is the code:
public class Base { public EventHandler Click {get;set;} public Base(EventHandler clickHandler) { this.Click = clickHandler; } } public class Derived: Base { public Derived(): base((sender, e) => Execute()) { } private void Execute() { } }
The code compiles in MonoDevelop 3.0, but gives an error message in VS2010: An object reference is required for a non-static field, method or property "Base.Execute" Basically, it comes down to the fact that when you call the base class constructor from the constructor of the derived class MS C # the compiler does not allow access to methods / properties of a derived class, etc. Like this?
imgen
source share