steve238
steve238

Reputation: 1259

Easiest way to refactor var to explicit type in C# with VSCode

In Visual Studio Code (not Visual Studio) I want to automatically refactor var types to explicit types when writing code in C#.

Is there an extension/feature in visual-studio-code that allows this?

Example - automatically convert this:

var x = 10;

to

int x = 10;

This is the same functionality in Visual Studio: https://learn.microsoft.com/en-us/visualstudio/ide/reference/convert-var-to-explicit-type?view=vs-2019

Upvotes: 3

Views: 798

Answers (1)

Jay124
Jay124

Reputation: 106

The C# extension by Microsoft offers this functionality.

Upvotes: 1

Related Questions