Search code examples
c#visual-studiovisual-studio-debugging

what does the "no way" sign icon mean into VS watch pannel?


There is a scope icon in Visual Studio watches that I do not understand, it is the "no way" sign that is sometimes present over the property or field icon. CF attached screenshot.

enter image description here I did check on the doc of VS2015 icons and definitely do not see this "no way" sign: https://msdn.microsoft.com/en-us/library/y47ychfe.aspx

What does it mean?

EDIT: my property is declared as public:

public virtual DateTime? MyProp1 { get; set; }

And the sign is not present because of the virtual keyword because I have in this same class other auto-properties also declared as public virtual and the spy did not bother to add this "no way sign". For instance:

public virtual MyType MyProp2{ get; set; }

Solution

  • I got it! This apparently only occurs when the property is nullable

    public DateTime? MyProp1 { get; set; } //there will be a "no way icon" when the property is instanciated
    public DateTime MyProp2 { get; set; } //no "no way icon"
    

    Still no idea why this icon is not listed in the MS documentation link in the original post...