Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

C# C# Basics (Retired) Console I/O Formatting Output

Sky Dagan
Sky Dagan
2,636 Points

Can't compile my code, why?

this is my code --> http://screencast.com/t/38FlA7DK4Q

when I try to compile it I get: treehouse:~/workspace$ mcs Workout.cs
error CS5001: Program Workout.exe' does not contain a staticMain' method suitable for an entry
point
Compilation failed: 1 error(s), 0 warnings

Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Sky Dagan It's hard to know for sure with just a screenshot. I don't see anything blatantly wrong with the code that would cause it not to compile. However, from your screenshot what I can say is that neither of those files had their changes saved before compiling (as indicated by the orange dots on the tabs).

2 Answers

Steven Parker
Steven Parker
218,813 Points

:point_right: I think Jennifer spotted the problem. You didn't save your edits yet, so the compiler is working with incomplete or empty source files.

Sky Dagan
Sky Dagan
2,636 Points

Oops. Already understood it ^^

Thank you :)