Default Comment Format for ASP.NET MVC Controllers

Can someone explain the format for ASP.NET MVC controllers? They look like this:

public class ProductsController : Controller
{
    //
    // GET: /Products/Edit/34

    public ActionResult Edit(int id)
    {
        // ...
    }
}

Why don't they follow standard C # annotations with three abbreviations and XML markup? And why is there an empty line between the comment and the method?

I think it looked something like this:

public class ProductsController : Controller
{
    /// <remarks>
    /// GET: /Products/Edit/34
    /// </remarks>
    public ActionResult Edit(int id)
    {
        // ...
    }
}
+3
source share
3 answers

I only guess, but the format you specified is not for comments, but for the built-in documentation. You have the option to modify the T4 templates to get the coding style you prefer.

0
source

, , , (, ).

, , /Products/Edit/34 - .

+3

I think the author of this comment did not want it to be included in the assembly documentation.

0
source

Source: https://habr.com/ru/post/1734839/


All Articles