Search code examples
conventionsstatic-classes

Should static classes have their first letter uppercased?


Generally speaking, (for any object-oriented programming language) conventionally, should the first letter of a static class be uppercased?

As an example, in:

// Example of a static class in JavaScript ES6

class myStaticClass {
  static toUppercaseOrNotToUppercase() {
    return Stackoverflow.ask('Should static classes like this conventionally have their first letter uppercased?');
  }
}

Should the class be declared as myStaticClass or MyStaticClass?


Solution

  • according to Microsoft and best practices, Class Name should be in PascalCasingis whether it static or not naming guidelines.