Ubuntu控制台上的Monodevelop.ReadLine不起作用 [英] Monodevelop on Ubuntu Console.ReadLine doesn't work
本文介绍了Ubuntu控制台上的Monodevelop.ReadLine不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在Ubuntu的Mono平台上进行开发. 但是我在第一个应用程序上遇到了麻烦:) 这是代码:
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");
}
}
}
结果如下:
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?
我的环境:
Ubuntu: Linux nozim-desktop 2.6.32-32-generic-pae
MonoDevelop:
version: 2.2.1
Build date: 2010-03-09 16:12:25+0000
推荐答案
MonoDevelop的默认控制台不支持ReadLine(),但是您可以在项目选项中设置一个选项来启动外部控制台.
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
这篇关于Ubuntu控制台上的Monodevelop.ReadLine不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文