我知道使用///来注释一个函数是正确的方法,它也适用于属性,如下面的代码所示
/// <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; }
}
我想知道是否有比///最少 3 行的注释类属性更简单的方法。
最佳答案
它只是 XML。如果需要,您可以在一行中完成。
/// <summary>Description A (working for intellisense)</summary>
public int iA { get; set; }
关于c# - 如何为 Visual Studio 智能感知评论类的属性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14510386/