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#

Map.cs(14,27): error : The type or namespace name `Point' could not be found. Are you missing an assembly referen..

Hey all - I'm taking the C# courses and I can't seem to figure out why it is I'm receiving the error, "Map.cs(14,27): error CS0246: The type or namespace name `point' could not be found. Are you missing an assembly reference?" when I go to run the TreehouseDefense.exe program.

The syntax looks identical to the video and I still can't seem to solve this issue.

Course: "Using Static Methods" Workspace: https://w.trhou.se/t8t5hxpmvb

2 Answers

Steven Parker
Steven Parker
229,744 Points

In Map.cs on line 14, the class name "Point" needs to be spelled with a capital "P":

        public bool OnMap(Point point)

Also, on line 16 "InBounds" was not declared. But you don't need it, you can return the result of the comparisons directly.

            return point.X >= 0 && point.X < Width && 
                   point.Y >= 0 && point.Y < Height;

Ah! Of course. Thanks for catching the latter issue as well!

You're the best, Steven!