tags:

views:

985

answers:

2

I am trying to a simple C# program that takes input and passes it as output. For instance, the output should be:

What is your name?
{user input}
Your name is {user input}

The program is:

public static void Main(string[] args)
{
    Console.WriteLine("What is your name?");
    string name = Console.ReadLine();
    Console.WriteLine("Your name is: " + name);
    Console.ReadKey();
}

This is enclosed in a class called 'MainClass'

Its output is:

What is your name?
Your name is:

Why is this not working and how can I make it work?

P.S. I am using MonoDevelop and I added Console.ReadKey(); after the last WriteLine. No change.

+3  A: 
configurator
I'd +1 you again just for the stamp. lol
Samuel
It's stolen from http://www.codinghorror.com/blog/archives/000818.html
configurator
+1 for the stamp, hahaha
Matt Olenik
+8  A: 
Ray Womack
I agree. When the question was posted, and my original answer was given, it said nothing about MonoDevelop
configurator