- Home /
How can I give a description to a constructor for a custom class?
Simple little question here. I've created a class that has several constructors. Several default classes have descriptions for their different constructors so that you know what they do, or what certain variables are. Is there any way I can add a description to my constructors so that when I'm scrolling through them in VisualStudio, I can see what they're for without having to look back at the original class?
Answer by ShadyProductions · Jun 11, 2017 at 08:57 AM
/// <summary>
/// Here comes the explanation
/// </summary>
/// <param name="variablename">info about variable</param>
/// <returns>if your method is not void, you can use this to describe what it returns</returns>
These kind of comments can be put into your code if you use visual studio you can right click your method or class etc and find the 'add comments'.
Answer by IgorAherne · Jun 11, 2017 at 04:28 AM
Yes, by typing tripple forward slash above constructor ///
normal comment would be double slash
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
How do I run Start() inside a nested class? 1 Answer
Cant access the Image icon from class 1 Answer
Using classes between scripts in C#? 2 Answers