0

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.
         */
    }
}
Altair
  • 304
  • 2
  • 9
  • 1
    Something to do with the double star? That's like a doc-comment in Java... change it to `/*` instead of `/**` – jonnystoten Feb 15 '13 at 16:58

1 Answers1

9

Just remove the second * on the first line of the comment.

C-style XML doc comments are opened with /**.

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
  • I see, only `/**` triggers the warning, any other amount of `*` in the first line does not trigger the warning. Thanks @SLaks and @applechewer. – Altair Feb 15 '13 at 17:08