views:

23

answers:

1

Hi,

Whenever I use a variable name that stands for a primary key as

int pk_MyObject = GetPrimaryKey(myObject)

ReSharper complains about the pk_MyObject and offers me to rename it pkMyObject.

How can I add a new rule to ReSharper so that it does not complain about variable names such as xx_YYYYY ?

A: 

Resharper > Options > Languages > C# > C# Naming Style > Override Custom Settings and then edit the entities you'd like.

Note: This is based on ReSharper 5.1. If you're running a different version the menu items might be named differently, but it should be possible to do since 4.5

Also, see this question How to use bdd naming style with Resharper 4.5?

Tchami