When I want to have an attribute and XML documentation for a method/property - what is the correct order to write them above the method/property?
This sounds so trivial, but...
If I use:
/// <summary>
/// Something here
/// </summary>
[MyAttribute]
public void MyMethod() {}
Build is successful and ReSharper is "happy", but I don't see the documentation in IntelliSense for MyClass.MyMethod
.
When I use:
[MyAttribute]
/// <summary>
/// Something here
/// </summary>
public void MyMethod() {}
Build is successful but ReSharper has a warning (XML comment is not placed on a valid language element), and I still don't see the documentation in IntelliSense for MyClass.MyMethod
.
I've searched the internet and see only examples where attributes are used without documentation; or documentation without attributes.
Is there really no way to have attributes and XML documentation for the same method/property?
Info: WPF application, .NET 4.0, C#.