1

I'm on Visual Studio Code and I'm wondering what the shortcut is for creating documentation in C# for functions, variables, and classes since in VS Studio it's just pressing / three times.

Gama11
  • 31,714
  • 9
  • 78
  • 100
CraftedGaming
  • 499
  • 7
  • 21

2 Answers2

5

Update Dec 16, 2020

This is now included in the default c# extension as of v1.23.8

You'll have to go to Preferences > Text Editor > Formatting and enable Format on Type

Or add the following in your settings.json file:

{
    "editor.formatOnType": true,
}

Then adding three slashes /// above a member will auto-generate the XML doc comment.

xml doc comment example

KyleMit
  • 30,350
  • 66
  • 462
  • 664
0

I didn't find any shortcuts in VS Code. I tried search on Stack but it gave me "how to toggle the function comment on hover".

I looked up on the extensions and saw this https://marketplace.visualstudio.com/items?itemName=k--kato.docomment

It works similar to Visual Studio where you have to press / three times.

CraftedGaming
  • 499
  • 7
  • 21