使用NUnit和XML注释进行C#注释的格式

Foo*_*Bar 3 c# xml nunit

使用NUnit和XML注释编写C#代码时,是否需要首选格式?

将:

using NUnit.Framework;


namespace FooBar{

    /// <summary> 
    /// The <c>foo</c> class tests bar
    /// </summary>
    [TestFixture]
    public class Foo{
    }
}
Run Code Online (Sandbox Code Playgroud)

是正确的还是:

using NUnit.Framework;


namespace FooBar{

    [TestFixture]
    /// <summary> 
    /// The <c>foo</c> class tests bar
    /// </summary>
    public class Foo{
    }
}
Run Code Online (Sandbox Code Playgroud)

会更好?

Kie*_*one 7

这不是NUnit特有的 - 它是任何属性.

这是一个偏好问题,但至少对我来说,评论应该在代码之前 - 属性也算作代码.