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 Inheritance Inheritance in Code

dsteelz
dsteelz
1,203 Points

code doesn't work

i've been following along ever since the video began. now my code won't work and i have no clue why. when I compile Point class, it says I'm missing a main method. when i compile the MapLocation class, it says that the class I'm inheriting from (Point) does not exist. when i compile in Game class, it says that I'm missing a bunch of assembly references. lastly, when i try to compile every file at once, it says that that "TreehouseDefense is a binary file and not a text file" and "file .cs doesn't exist"

dsteelz
dsteelz
1,203 Points

https://w.trhou.se/8m7z3md1hu this is the link to my workspace

1 Answer

Steven Parker
Steven Parker
231,268 Points

You might be using the wrong command to build.

Try using this command to build your program :point_right: mcs *.cs
Then this command to run the program :point_right: mono TreehouseDefense.exe

Also, you have a typo on line 15 of Game.cs where instead of "point" (lower-case "p") you have "Point" (capital "P").

dsteelz
dsteelz
1,203 Points

yep, you were right. thanks