1
Vote

Context sensitive properties in C#

description

The following code presents a problem:
 
public class Presenter {
//...
public User Model { get {return user; } }
 
public void Update() {
    view.UserName = Model.Name;
}
}
 
Model.Name looks like an invocation of a static property on a class Model. Given the context we know that Model is a property whitin the class so "Model" should not be painted as a type in this case.

comments