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 Receiving Input

Anne Donald
Anne Donald
9,847 Points

Error When trying to execute file

I'm typing the following code as per the video:

class Program { static void Main() { // Prompt the user for minutes exercised

  System.Console.Write("Enter how many minutes you exercised: ");

  string entry = System.Console.ReadLine();



    // Add minutes exercised to total
    // Display the total minutes exercised to the screen
    // Repeat until the user quits
}

}

And got the following result when I mono Program.exe in the console: ;1;1R

Steven Parker
Steven Parker
220,378 Points

Odd, it looks like you should have seen the prompt message. You compiled it again (using mcs) after saving, right?

To enable a more complete and accurate analysis, make a snapshot of your workspace and post the link to it here.

2 Answers

Steven Parker
Steven Parker
220,378 Points

Congratulations on resolving your issue. :+1:

Hopefully any future ones will not be so mysterious. :wink:

Anne Donald
Anne Donald
9,847 Points

Hi Steven

Thank's for your quick reply! I came out of it completely and I was going back in to take a snapshot and now it's working? It's obviously something I must have done.

Thanks Again Anne