[MonoDevelop] ReadLine does not stop for input

Ian Norton Ian.Norton-Badrul at thales-esecurity.com
Thu Mar 24 17:07:28 EDT 2011


Hiya,

If you want to have a proper terminal ( it sounds like you do ) then  
you should enable 'run on external console' in the project's run  
settings.

The application output pad isn't a full terminal so your app won't be  
able to read from stdin.

Regards

Ian

On 24 Mar 2011, at 20:52, "fastone" <ourshopper at cox.net> wrote:

> Hello Everyone,
>
> I'm new to this list so I hope this is appropriate.
>
> I'm working on a C# online course and using MonoDevelop and Mono on my
> mac to do my coursework and I've run into a problem that I'm hoping
> someone can help me with. I'm trying to debug the following code:
>
> public class Lesson3Part2
> {
>        public static void Main()
>        {
>                System.Console.Out.Write("Enter the first number:");
>                string num1String = System.Console.ReadLine();
>                double num1 = System.Convert.ToDouble(num1String);
>
>                System.Console.Out.Write("Enter the second number:");
>                string num2String = System.Console.ReadLine();
>                double num2 = System.Convert.ToDouble(num2String);
>
>                double sum = num1 + num2;
>
>                System.Console.Out.WriteLine("The sum is " + sum);
>        }
> }
>
> When I get to any line with "System.Console.ReadLine()" the code does
> not stop for input. Instead, it continues to the end of the main
> routine without pause for input. The code was taken from the lesson
> verbatim and so I assume it should work.
>
> When I run the code in the debugger an "Application output" window
> comes up with the following output:
> " Enter the first number:Enter the second number:The sum is 0"
>
> Questions: Should I be able to enter input into the "Application
> Output" window? If not, then how? If so, then can anyone explain what
> my problem might be?
>
> Before anyone suggests it I've already asked my professor and he was
> no help at all.
>
> Thanks in advance for any help.
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-list


More information about the Monodevelop-list mailing list