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# C# Objects Methods Overloading Methods

Why use Point point and not Point point2

Im confused why do we use Point point and not Point point2? Why would we want to see the distance from point to point, arent they the same?

1 Answer

Patrik Horváth
Patrik Horváth
11,110 Points

Hi i try explain it little bit

C# is case sensistive because it takes after the C style languages which are all case sensitive.

  • Class is like BluePrint and convention tell us we have to write it with Big 1st latter ( example : Point )
  • instance is something thath we make with our BluePrint so it have to have same properties (atributes in class) and functions (methods in class)
Point point;
point = new Point();

or this

Point point = new Point();

This is just for LEGEND

1-Point 2-point; point = 3-new 4-Point();

  • 1 - We gonna use Point class as Template ( blueprint )
  • 2 - our random name for our variable where we want STORE this Template
  • 3 - we want Make our Object from Template
  • 4 - From Templete Constructor

and Point and point is diffrent it like i have new "iPhone " and i tell you no you have chinase copy of "iphone " :smile: seems same but its not