Create resharper naming convention based on data type of variable

I am trying to create a custom naming rule in resharper based on the data type of a variable. I want to create a rule that will check the datatype of a variable and recommend the appropriate prefix. Is it possible.

An example for these local variables:

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

      

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

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

+3


source to share





All Articles