6

When I create a new test like the following:

It should_get_something = () => foo();

When I hit the semi-colon resharper sticks private on the front of the delegate:

Private It should_get_something = () => foo();

I then have to remove it.

Can I tell resharper not to do this? I tried adding a rule to the naming style dialog selecting Machine.Specifications.It and unchecking Private but this had no effect.

78lro
  • 1,790
  • 7
  • 37
  • 63

3 Answers3

3

In general I recommend to set up ReSharper like Aaron has suggested here.

Alexander Groß
  • 10,200
  • 1
  • 30
  • 33
2

Not strictly what you're asking about, but you should a look at this too.

Tim Scott
  • 15,106
  • 9
  • 65
  • 79
2

Yes, you can stop Resharper forcing you to use explicit private modifier. Just untick "use explicit private modifier" here: Resharper - Options - Languages - C# - Other - Modifier

Tormod Hystad
  • 2,345
  • 1
  • 19
  • 15