有一个问题
///<summary>
///This is summary for some class or method
///</summary>
我需要查看关于类或方法的文档。但是如何为简单变量或列表编写文档?
我使用Visual Studio 2010,当我悬停在某个列表、属性或者其他内容上时,我希望能够看到我为该特定内容编写的摘要(在那个小提示框中)。
///<doc>
///always use this list!
List<String> beer = new List<String>();
编辑:好的,我们已经发现,只要您在类中但在方法或函数之外进行评论,它就像通常一样工作!
有没有办法在方法内部进行文档/评论?
public class BeerForall
{
/// <summary>
/// it works here
/// </summary>
public List<String> beer = new List<string>();
public String giveBeer()
{
/// is not working, u can not comment
/// <summary>
/// test test, not working
/// </summary>
List<String> moreBeer = new List<string>();
return "beer";
}
}