Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C#

Angel Smith
Angel Smith
1,590 Points

Why are the int variables capitalized?

I thought that variables were typed out camelBack style. So why in this example, are "Width" and "Height" capitalized? I understand that it's preference, but I was always under the impression that the conventional way is camelBack.

Thanks!

1 Answer

Steven Parker
Steven Parker
231,172 Points

The convention varies by variable usage.

The convention is to use PascalCasing (upper case first letter) for all public member, type, and namespace names and to use camelCasing for parameter names.

For future questions, always remember to show the code and include a link to the course page you were working with.

Angel Smith
Angel Smith
1,590 Points

I honestly should have just continued the video because it explained that naming convention later, and I checked out the naming conventions in the teachers notes. Still figuring out how comments work, so I will be sure to remember to post it linked with the video in the future. Thank you for your quick response!