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 Methods Using Static Methods

Isaac Warbrick
Isaac Warbrick
1,109 Points

Should have asked this earlier but why do we have to write "mcs -out:TreehouseDefense.exe..." into the console?

Not sure why we don't just write " mcs *.cs && mono.TreehouseDefense.exe" like we use to do in earlier lessons?!

2 Answers

Pranava Varshan
Pranava Varshan
3,082 Points

He deleted the Game.exe file , as the name was not suitable and wanted to rename it as TreehouseDefence.exe to make sense.

If you compile it usually it creates a Game.exe file again , but this command is specifies the name of the executable file that that is to be produced from compilation (and not Game.exe)

Hope this clears your mind. Good luck on your further journey

Simon McGuirk
Simon McGuirk
2,673 Points

It's been a while since I did this but I believe you include -out:TreehouseDefense.exe as this specifies the name of the executable file that is produced from the compilation.