starts the names of primitive types with lower-case letters and all others with upper-case letters.

*could* do that.

Or, reasonably, it could use capitalization to distinguish between value types (like ints and structs) and reference types (like classes).

But no. C# uses this to indicate whether a type is *predefined*. So string and object, unlike all other classes, start with lower-case letters.

Worse, string and object are actually aliases for System.String and System.Object, respectively.

Why would you add aliases to make things *less* consistent?

Follow

@peterdrake To be fair, *all* predefined types have associated upper-named classes, not just string and object. I.e. int has System.Int32

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.