gpt4 book ai didi

c# - 如何为 Visual Studio 智能感知评论类的属性?

转载 作者:太空狗 更新时间:2023-10-29 21:05:21 25 4
gpt4 key购买 nike

我知道使用///来注释一个函数是正确的方法,它也适用于属性,如下面的代码所示

/// <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; }
}

enter image description here

我想知道是否有比///最少 3 行的注释类属性更简单的方法。

最佳答案

它只是 XML。如果需要,您可以在一行中完成。

/// <summary>Description A (working for intellisense)</summary>
public int iA { get; set; }

关于c# - 如何为 Visual Studio 智能感知评论类的属性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14510386/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com