When using vsCode, hovering over a built-in Method with your mouse will show a little pop-up window, where the method, return type and parameters are displayed. There usually also is a quick description, as to how the method works or what it does.
I want to add a description like that to my methods, but I can't seem to find how. Please Help.
I am working on a 3D Game in Unity, using C#.
CodePudding user response:
XML comments on your source code, e.g.
/// <summary>
///
/// </summary>
/// <param name="parameter"></param>
/// <returns></returns>
private object Method(object parameter)
{
// ...
}
In Visual Studio, you just type the three slashes and it automatically adds that template. I'm guessing that VS Code might need more manual intervention.
EDIT: Seems like VS Code might be able to lend a helping hand, according to this. It says:
In order to enable them, we need to enable the configuration Format On Type on File->Preferences->Settings->Text Editor->Formatting