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
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.