.net - Custom Naming Style Options in Resharper For Backing Fields -
the coding standard in organization private fields lowercamelcase backing fields used properties prefixed underscore (_
). there way add rule backing fields in resharper naming style tool.
here's naming rule editor:
i'd rather error not show local variables
examples in vb , c#:
vb:
public class employee 'should lowercamelcase private usecode string = "new" 'should _lowercamelcase private _name string public property name() string return _name end set(byval value string) _name = value end set end property end class
c#:
public class employee { //should lowercamelcase private string usecode = "new"; //should _lowercamelcase private string _name; public string name { { return _name; } set { _name = value; } } }
whether agree or not naming convention, there way ask reshaper enforce this?
there no way enforce naming rules backing fields in resharper, can add multiple rules entity kind.
with settings applied, resharper allow have fields , without underscore prefix.
Comments
Post a Comment