【发布时间】:2011-06-15 19:20:24
【问题描述】:
搜索一下,我发现thepast 中提出了这种问题,但不是针对 VS2010 或 C# .Net 4. 有没有人遇到过一种方法来让接口 cmets 继承到实现用于智能感知的类?
一位同事建议复制并粘贴到实现中,但必须有更好的方法。查看前面的问题建议 Sandcastle 似乎是一个文档生成器,这不是我需要的。
考虑以下几点:
public interface IFoo
{
/// <summary>
/// Comment comment comment
/// </summary>
string Bar { get; set; }
}
public class Foo : IFoo
{
public string Bar { get; set; }
}
public class Test
{
public Test()
{
IFoo foo1 = new Foo();
foo1.Bar = "Intellisense comments work";
Foo foo2 = new Foo();
foo2.Bar = "Intellisense comments don't work";
}
}
有没有办法让 foo2 上的智能感知工作?
【问题讨论】:
-
我使用 GhostDoc 将文档添加到我的方法和属性中。它还将复制诸如接口之类的内容的摘要。免费:submain.com/products/ghostdoc.aspx
标签: visual-studio-2010 c#-4.0 comments