Skip to main content
3 of 7
added 68 characters in body
Doc Brown
  • 214.2k
  • 34
  • 394
  • 604

"I'm wondering if there is a widely accepted convention for naming base classed in OOP"

Short answer: no, there is not.

If you want to read something directly out of the name of a class, you need to consult the programming guidelines of your team or organization. There are only very few more widely accepted naming conventions, and even those don't apply to "OOP in general", but usually to a specific language ecosystem.

For example, in Java or C#, I would usually expect a type name starting with a single I to be an interface (though not every team names gives interfaces always an I prefix). For a class ending with the word Exception I would expect it to be a derivation of java.lang-Exception or System.Exception. In Python, the PEP 8 style guide suggests to let exception classes (which represent errors) end with the name Error.

Specifically for C#, I guess that list is complete. I cannot remember to have seen a naming style "broadly accepted" across teams and organizations, where part of a class name induces a clear semantics.

Doc Brown
  • 214.2k
  • 34
  • 394
  • 604