3 ms·
I fought and lost this battle with one of our teams. The tech lead insisted they use XML comments (Visual Studio) for everything. ///<Summary> ///Represents t
by PH95VuimJjqBqy 3y ago
I fought and lost this battle with one of our teams.
The tech lead insisted they use XML comments (Visual Studio) for everything.
///<Summary>
///Represents the User
///</Summary>
public class User
{
///<Summary>
///Users Age
//</Summary>
public int Age {get;set;}
///<Summary>
///Users First Name
//</Summary>
public string FirstName {get;set;}
}
ad nauseum.
Here's the thing. Swagger (.net) can pick up the XML file generated from these comments and it gives developers the ability to add more information to the Open API Spec file (swagger generates a UI off of it).
So it has a legitimate use, but if you don't have anything than to repeat what the damned code already says, it's harmful to the readability of the codebase.