2

When I use the light bulb refactor built into Visual Studio to generate a local variable it always uses the var syntax:

enter image description here enter image description here

I (personally) don't like var and would prefer to it to use an explicit type (in this instance double). so it should create the code:

double v = CalculateDownTime(lineid, start, end);

How can I alter the Visual Studio settings so that it will do this? Is it possible?

Please don't discuss the pros and cons of var vs explicit types. And no I don't want to use Resharper.

Liam
  • 27,717
  • 28
  • 128
  • 190

1 Answers1

3

I've just found it, this related question helped

Untick the Use var when generating locals under:

enter image description here

Community
  • 1
  • 1
Liam
  • 27,717
  • 28
  • 128
  • 190