A warning is given because of a problem that may occur in the following situation.
An object of a derived type UserDetailViewModel , say, "ConcreteModel" is being built
ConcreteModel overrides the Screen.DisplayName property. In a property set method, it depends on the constructed completed ConcreteModel , say, accessing another member that is initialized in the constructor.
In this case, the above code throws an exception.
The correct way to solve this is to declare DisplayName sealed in the UserDetailViewModel . Now you can be sure that it is normal to ignore the warning.
The following example demonstrates this. Uncommenting strings in Der causes a compilation error.
class Base { public virtual string DisplayName { get; set; } } class Der : Base { public Der() {
Miserable variable
source share