我知道使用///来评论函数是正确的方法,它也适用于属性,如下面的代码所示
/// <summary> /// This is for demo /// </summary> public class Foo { /// <summary> /// Description A (working for intellisense) /// </summary> public int iA { get; set; } /// Description B (not working for intellisense) public int iB { get; set; } public int iC { get; set; } }
解决方法
它只是XML.如果你愿意,你可以在一行中完成.
/// <summary>Description A (working for intellisense)</summary> public int iA { get; set; }