Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed C# Objects!
You have completed C# Objects!
Preview
Methods that are called directly on a class name are static methods. Don't confuse them with instance methods which are called on unique instances of the class (AKA objects).
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
For that we need to calculate the distance
between two points on the map.
0:00
We should write a method to
perform this calculation and
0:02
return the distance between two points.
0:04
First we need to decide
where to put this method.
0:07
Take a moment to think about which of
these classes this method should go in.
0:11
We should think about which class has
the most in common with this method.
0:16
This method will only deal with points.
0:20
So the natural place to
put it is the point class.
0:23
That way we can ask any point how
far away it is from any other point.
0:26
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up