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 Object-Oriented Programming Fields

Andrada Terenche
Andrada Terenche
1,103 Points

mcs -out:TreehouseDefense.exe *.cs

I don't quite understand. After he removes Game.exe, does he rename anything? And why type mcs -out:TreehouseDefense.exe *.cs while in the C# Basics it was only mcs TreehouseDefense.cs?

1 Answer

Jon Wood
Jon Wood
9,884 Points

It's doing different things.

mcs -out:TreehouseDefense.exe *.cs says to take all files that end with .cs and compile them into a file called TreehouseDefense.exe. If he didn't specify the -out it would just name as the first file it finds alphabetically.

mcs TreehouseDefense.cs is just compiling one file called TreehouseDefense.cs. Since it's the only file being compiled it will name the exe file the same as the cs file - TreehouseDefense.exe.

So if doing -out:TreehouseDefense.exe takes all files, why is he doing " *.cs"? what is that being used for?

thanks