Variable naming - missed opportunity

Hi,

Not really optimistic that this will make it for 4.5 now, but I was disappointed not to see it, what with the better variable naming stuff:

If I enter this:

    class MyTestClass
    {
        public MyTestClass()
        {
            _myNewField = 1;
        }
    }

then '_myNewField' is highlighted in red, and I can do alt-enter on it, to get a load of options about creating a field, creating a local variable, etc

The first option in the pop-up menu, and the one whic is selected by default, is "Create Local Variable".

*However* I have _lowerCamelCase set up as my field variable naming convention, so R# already knows I want a field and not a local variable - indeed, if I do choose the default from the menu, R# creates a local variable called _myNewField and immediately starts to complain about its naming.

This is not very Resharperesque behaviour!  I can see why you might not want to change the order of that menu, but could you perhaps at least default to the item which is most likely, based on the naming convention?

Thanks,

Will

Please sign in to leave a comment.