I have a class with a bunch of properties, the class is not inheriting or implementing anything.
Why do the two properties (in the red squares below) have a different icon to the other properties?
What does the icon represent?
This is what the class looks like:
As you can see, CompanyID
and CompanyName
are also public properties, however EAP
which is a public property does not have the same icon.
If the value of the property is not null, the wrong icon is used, if the value is null, then the correct wrench icon is used.
I'm using VS Enterprise 2017, version 15.9.15.
This was reported here on the Visual Studio Developer Community page.
Quoting the bug report:
Given this property:
public int? Port { get; set; }
In the debugger I see a box with a heart next to it (ie. the "Field or Variable" icon together with a "Friend/Internal" signal icon).
Surely it should be a wrench icon (for "Property") and no signal icon, given the public accessibility.
According to this page, a fix was released on/around the 18th of June. (Edit: It isn't fixed!)
If this is still in the latest version, I recommend posting a new bug report on the same page (or by clicking the feedback button in Visual Studio and selecting "Report a problem"):
As for what the icon means, you can check Class View and Object Browser Icons, which identifies it as a field/variable (box) and internal (heart).
Edit: I just tested this for myself on Visual Studio 2017 Enterprise v15.9.17 and it's still presenting:
As such, I've reported a new issue here.
The icon itself means friend/internal (heart) field/variable (blue cuboid).
See icon documentation here.
Which is odd because EAP is clearly neither of those things.
The only noticeable thing different about those two properties is that they are nullable value types.
I wonder if it's a weird side effect of that producing the wrong icon?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With