create resharper naming convention based on data type of the variable

150 views Asked by At

I am trying to create a custom naming convention rule in resharper based on the data type of the variable. I want to create a rule that would check the data type of the variable and would recomend matching prefix. Is this even possible.

Forexample for these local variables:

Dim strName As String
Dim intAge As Integer
Dim strGender As Boolean

In this case resharper rule should underline strGender since type is Boolean and prefix is str instead of bln. It would be nice if it would suggest blnGender for a new variable name similarly for variables with int prefix for Integer type, str for string, obj for object.

I am not worried about unknown types at compile time. I am working with ReSharper8

0

There are 0 answers