Auto create local variable in VS?

In Visual Studio 2012, when an expression (with a known type) is assigned an undefined identifier (say:) xxxx=2;

, causing a compilation error "The name" xxxx "does not exist in the current context", the proposed fixes Generate property stub

and Generate field stub

.

I wonder why there is no similar option Generate local variable

and if there is some kind of shortcut so I don't have to type it.

+3


source to share





All Articles