4

I'm trying to develop on Mono platform on Ubuntu. But I got trouble on my first application :) Here is the code:

using System;
using System.Threading;

namespace threadings
{
class MainClass
{
    public static void Main (string[] args)
    {
        Console.WriteLine ("The start");
        string x=Console.ReadLine();
        Console.WriteLine(x);
        Console.WriteLine ("the end");
    }


}

}

And here is the result:

The start

the end

And no any string between them, and no reading from console happens, and I can't input anything. What is the problem? Maybe I do something wrong?

My environment:

Ubuntu: Linux nozim-desktop 2.6.32-32-generic-pae
MonoDevelop: 
        version: 2.2.1 
        Build date: 2010-03-09 16:12:25+0000
Nozim
  • 587
  • 3
  • 14
  • 34

1 Answers1

11

MonoDevelop's default console doesn't support ReadLine(), but you can set an option in the project options to launch an external console instead.

Options / Run / General / Run on external console

jstedfast
  • 35,744
  • 5
  • 97
  • 110
  • 1
    Wanted to add that I was able to run `ReadLine()` with fresh installed MonoDevelop's default console just fine, I guess they fixed something. – Evgenia Karunus Jan 14 '15 at 12:36