"All constructors should be before all methods in a class."
According to the StyleCop Rules Documentation the ordering of items in a class is as follows:
- Constant Fields
- Fields
- Constructors
- Finalizers (Destructors)
- Delegates
- Events
- Enums
- Interfaces
- Properties
- Indexers
- Methods
- Structs
- Classes
public partial class Banner
{
public void MyMethod()
{
...
}
public Banner()
{
...
}
}should be 🡻
public partial class Banner
{
public Banner()
{
...
}
public void MyMethod()
{
...
}
}