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#

Petter Östergren
Petter Östergren
6,920 Points

Putting it all together: Overload error for `DistanceTo`

Hello, I’m currently getting an issue when trying to compile my project.


MapLocation.cs(15,14): error CS1501: No overload for method ’DistanceTo’ takes ’1’ arguments
Point.cs(16,16): (Location of the symbol related to previou error)

Snapshot: https://w.trhou.se/jbpc1igfth Any thoughts on what this means?

1 Answer

Przemyslaw Hendel
Przemyslaw Hendel
3,525 Points

In point.cs the method Distanceto takes 2 arguments, but in in maplocation.cs you're passing only one argument to the method