问题
We have Visual studio(2013) and resharper(V9), and currently by default, when create a new variable, we always have the first proposal as var
. We are kind of allergic of this var
(this is our opinion,I can accept that other doesn't have the same, but that's not the point). We can select with the keyboard arrows the explicit type, but we would like have it by default.
I'm not sure if that default comes from Resharper or from Visual Studio, but does anyone has an idea how to have the explicit implementation instead of the var?
Is this something we can do directly for the whole team?
回答1:
R# Options -> Code Editing -> C# -> Code Style -> 'var' usage in declarations
来源:https://stackoverflow.com/questions/32604291/visual-studio-how-to-have-explicit-type-by-default