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# 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
229,582 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 :)