Home c# How to write comments to method parameters?

How to write comments to method parameters?

Author

Date

Category

In what form should I write comments on the methods of the method so that when calling the method in his tip, these comments?


Answer 1, Authority 100%

There is such a thing – XML ​​comments. They differ from the usual topics that are preceded by three slashes, not two. For example:

/// & lt; summary & gt;
/// Description of the method
/// & LT; / Summary & GT;
/// & lt; param name = "arg" & gt; description of the & lt; / param & gt parameter;
/// & lt; Returns & gt; OGBCFYBT Return value & lt; / Returns & gt;
Public Int Somemethod (String Arg)

Answer 2, AUTHORITY 60%

put /// Slash before the member name, then the studio will generate a cap to comment. You can fill it as in the example.

/// & lt; summary & gt;
/// Some method.
/// & LT; / Summary & GT;
/// & lt; param name = "count" & gt; number & lt; / param & gt;
/// & LT; Returns & gt; & lt; / returns & gt;
Public Void Method (Int Count)
{
}

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions