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

标签 c# visual-studio intellisense

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

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

相关文章:

c# - ASP.NET 4.0 单选按钮选中更改事件仅触发一次

c# - 使用 Unity3D API 了解陀螺仪读数

c++ - Visual C++ 2012 和 PCRE

c# - 防止对实现抽象类进行排序

jquery - 为什么 ASP.NET MVC2 中的 VS2010 给我错误的 JQuery 智能感知?

c# - 如何使用 LINQ to XML 将多级 xml 转换为对象?

visual-studio - Visual Studio C++ - 资源 View 空白?

ASP.NET MVC - 使用 VS Web 服务器预览 MVC 应用程序中页面更改的最快方法

visual-studio - Visual Studio 2015 RC 智能感知不显示参数列表

c# - C# 中的 Windows 应用程序?