技术开发 频道

新版.NET开发必备十大工具之GhostDoc


基本使用

   在安装完GhostDoc之后,在Visual Studio工具菜单中可以看到GhostDoc这样一项。



   首先我们编写一段简单的代码,如下所示:

public bool Add(string item)
{
//......
}

public bool Remove(string item)
{
//......
}

public void AppendHtmlText(IHtmlProvider htmlProvider)
{
//......
}
  当鼠标光标放在方法上时,按下热键Ctrl + Shift + D将会生成注释,如下所示:
/// <summary> 
/// Adds the specified item.
/// </summary>
/// <param name="item">The item.</param>
/// <returns></returns>
public bool Add(string item)
{
//......
}

/// <summary>
/// Removes the specified item.
/// </summary>
/// <param name="item">The item.</param>
/// <returns></returns>
public bool Remove(string item)
{
//......
}

/// <summary>
/// Appends the HTML text.
/// </summary>
/// <param name="htmlProvider">The HTML provider.</param>
public void AppendHtmlText(IHtmlProvider htmlProvider)
{
//......
}



 

0
相关文章