tags:

views:

80

answers:

2

I like the fact that ReSharper suggest me to use the var keyword.

Instead, I would like to know if it is possible to ReSharper to only hints me when I use type that are not basic.

Example :int myInt = ..., string myString = .... No hint here

I prefer to use var on complex type like : var myHttpModule = ..., var userRepository = ...

A: 

Alt+Enter menu should have the option to set the settings on that rule. I'm unsure if it supports distinction between the two. My version of ReSharper is old, we're still on VS2008 here.

Aren
+1  A: 

I have ReSharper 5 and the only 2 options are "Use 'var' keyword when initializer explicitly declares type" and "use 'var' keyword when possible".

It doesn't seem value vs reference types are an option. I agree though, this would be a nice option.

Jace Rhea