Che*_*hev 13 c# documentation comments interface xml-comments
标题基本概括了所有内容.我在哪里应用我的XML注释?我应该在界面中添加更通用的XML注释,并在实现类中添加更具描述性的注释吗?像这样:
public interface IObjectRepository
{
/// <summary>
/// Returns an object from the respository that contains the specified ID.
/// </summary>
Object GetObject(int Id);
}
public ObjectRepository : IObjectRepository
{
/// <summary>
/// Retrieves an object from the database that contains the specified ID.
/// </summary>
public Object GetObject(int Id)
{
Object myData = // Get from DB code.
return myData;
}
}
Run Code Online (Sandbox Code Playgroud)
<param>为简单起见,我没有包括在内.
这是一个很好的评论做法还是有不同的方式?我是否只是跳过评论界面?任何帮助表示赞赏.
| 归档时间: |
|
| 查看次数: |
4334 次 |
| 最近记录: |