Atori
Atori

Reputation: 113

How to generate switch statement labels on Visual Studio Code?

I want to generate switch statement labels in Visual Studio Code. I searched Google, the extensions marketplace, and the command pallete, but I didn't find anything. Is this action available?

Upvotes: 4

Views: 5191

Answers (2)

opus131
opus131

Reputation: 2036

This works with the OmniSharp extension:

enter image description here

More info here: https://github.com/OmniSharp/omnisharp-vscode/issues/1752

Upvotes: 4

M.Hassan
M.Hassan

Reputation: 11052

No, it is not available.

Visual studio code is a simple editor and hasn't capability like visual studio IDE and can't do this.

In Visual studio 2015 IDE You can generate switch statement labels for enumeration as: 1) write "switch" 2) press two times TAB for details, read Switch enum auto-fill

Also Resharper tool (integerated with Visual studio IDE) can do the same.

For details read: https://blog.jetbrains.com/dotnet/2006/06/14/quick-fixes-help-generate-switch-blocks/

Upvotes: 1

Related Questions