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
Multiple methods in the same class can have the same name. They're called overloaded methods.
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
They all take different types and
numbers of arguments.
0:00
This is useful because not all data that a
method can handle comes in the same type.
0:02
The DistanceTo method right now calculates
the distance between a point and
0:09
the x and y values parsed in.
0:13
We could also have
a DistanceTo method that
0:15
calculates the distance
between two-point objects.
0:19
This method can just call the other
DistanceTo method like this.
0:25
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