I started working with C# recently and I noticed that the convention seems to be that the variables start with a capital letter along with the methods.
Is this the only language that does this and why? For instance:
Page Page = new Page();
Page.Action();
In other languages, you'd see instead:
Page page = new Page();
page.action();
There are other examples of this that are confusing since I've worked a lot with UML, Ruby, C++ and Java.
My question is, why does C# do it this way when other languages do not?
Other Stack Overflow users are noting that C# does not follow this convention, this was just a mistake on my part.
Well actually, no: the convention in C# is for camelCased variable (and field) names, and PascalCase methods:
Page page = new Page();
page.Action();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With