Reputation: 294
I have many multi-line style comments in a C# project and when the project option is set to output a XML documentation file they all trigger the warning XML comment is not placed on a valid language element. This behaviour is observed in Visual Studio 2010.
Short of changing all these comments to single-line style comments what can I do to prevent these warnings from being triggered?
Reduced example:
public class Foo
{
/// <summary>
/// Does something.
/// </summary>
public void DoSomething()
{
/**
* Do something interest here.
*/
}
}
Upvotes: 0
Views: 1178
Reputation: 887295
Just remove the second *
on the first line of the comment.
C-style XML doc comments are opened with /**
.
Upvotes: 10