E.g.
Foo.cs:
using System;
/// <summary>
/// This file contains Foo and Bar-related things.
/// </summary>
namespace Xyz {
class FooThing {
}
}
Does C# support such XMLDoc comments?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, XML document comments can only appear on specific types of elements, as described in this article:
If you place a file-level XMLDoc-style comment in your file, it will be appended to the next class or other element that happens to appear. Certain documentation tools, like Sandcastle, provide a way to add namespace-level XMLDoc comments but they generally appear in a separate file.
Of course, you can use non XMLDoc-style comments in each file, e.g. a copyright header or similar, by just using standard /* */ style comment blocks.