VS Watch Pannel中的“ no way”标志图标是什么意思?

时间:2018-07-04 10:05:31

标签: c# visual-studio visual-studio-debugging

我不理解Visual Studio手表中有一个范围图标, 属性或字段图标上有时会出现“禁止”标志。 CF随附的屏幕截图。

enter image description here 我确实检查了VS2015图标的文档,但绝对看不到这种“没有办法”的迹象: https://msdn.microsoft.com/en-us/library/y47ychfe.aspx

这是什么意思?

编辑: 我的财产被宣布为公开财产:

public virtual DateTime? MyProp1 { get; set; }

并且由于虚拟关键字而没有显示符号,因为我在同一类中还将其他自动属性也声明为公共虚拟,并且间谍没有费心添加此“无路标”。 例如:

public virtual MyType MyProp2{ get; set; }

1 个答案:

答案 0 :(得分:1)

我明白了! 显然,只有当该属性可为空时,这种情况才会发生

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"

仍然不知道为什么原始帖子的MS文档链接中未列出此图标...

相关问题