Check class structure / fields first / autoproperties

Is there any way to add checks for the structure of classes. In my opinion it helps to

  • Have all data (fields) in the top of the class before methods/properties
    • => You can easily see what actually defines the state of the class by looking at the first lines
  • Don't mix auto-properties with normal fields in the same class
    • => Readability too. And it helps with intellisense too in the (very common) case that use prefixes like "_" for fields and don't miss fields that are implicitly created by Auto-Properties

Is there any chance to make Resharper produce a warning or hint that says. "Don't put methods/properties before fields" and "Don't mix Autoproperties with normal fields".

Please sign in to leave a comment.