[Mono-list] problem with Console and mono-0.10

Crni Gorac cgorac@webmail.co.yu
Fri, 5 Apr 2002 12:11:18 -0800 (PST)


Are there any problems regarding System.Console.Read*() in mono-0.10? I have code that works properly with .Net SDK but not with latest mono release. Simplest example to demonstrate problem would be:

//-------------------------
using System;

namespace Foo {
  class Bar {
    public static void Main()
      {
	Console.Write ("Your name, please? ");
	string name = Console.ReadLine ();
	Console.WriteLine ("Hello, {0}!", name);
      }
  }
}
//-------------------------


When compiled by mcs and launched by Mono under RedHat Linux 7.2 nothing happens, i.e. read phase is simply skipped:

#--------------------------
[crni@foo Hello]$ mcs Hello.cs
RESULT: 0
[crni@foo Hello]$ mono Hello.exe
Your name, please? Hello, !
RESULT: 0
[crni@gorac Hello]$ 
#--------------------------

When compiled by .Net SDK compiler and launched under Windows XP everything works fine.


Another question (shameless because I know this is not right place to ask it, but still): how to parse numbers from an input line in C#? I need to parse three double numbers that are in same input line, like this:
  0.21 0.43 0.65
I know the question is pretty stupid, but still this is my first day programming with C# and I managed to use "refelections" to get an interface through string and call a method on it in the very same program (same thing is much simpler to do in Perl, btw; and also bombastic terms aren't used there), while am still unable to complete it because I don't know how to get these numbers. Best mach I was able to found was to parse character by character. Rather frustrating...

Thanks,
Crni


_____________________________________________________________
Besplatan email za SVE - ime@webmail.co.yu - http://www.webmail.co.yu

_____________________________________________________________
Run a small business? Then you need professional email like you@yourbiz.com from Everyone.net  http://www.everyone.net?tag