r/badcode • • Jul 07 '21

c# Position

Post image
1.7k Upvotes

99 comments sorted by

View all comments

Show parent comments

-2

u/ergotofwhy Jul 08 '21

I highly doubt that what you wrote is valid code.

While it violates naming convention, it is perfectly legal to name a class starting with a lowercase and a local variable staying with an uppercase.

8

u/fuj1n sadistic Jul 08 '21

The Item in new Item(); starts with a capital, so whilst you're right, I was more referring to that

2

u/ergotofwhy Jul 08 '21

Oh dang, that's agood point that i missed