简体   繁体   English

从命令提示符运行MonoDevlop程序

[英]Run MonoDevlop program from command prompt

I've written a program in MonoDevlop that gets some user input then prints/writes it (using console.writeline ) but when I just click run it writes the line I told it to print but I am not able to type any input 我已经在MonoDevlop中编写了一个程序,该程序获取一些用户输入,然后打印/写入它(使用console.writeline ),但是当我单击运行时,它写了我告诉它打印的行,但是我无法键入任何输入

How would I run my program from the command prompt so that I can enter some input I am using Windows. 如何从命令提示符下运行程序,以便可以输入我使用Windows的某些输入。 Code is below if you need it for some reason. 如果出于某种原因需要代码,请参见下面的代码。

using System;

public class Hellow{

static void Main(){
    Console.WriteLine("this is a test line");
    string apple = Console.ReadLine();
            Console.WriteLine(apple);

}


 }

Thanks CodeBeard. 感谢CodeBeard。 Your answer solved my question. 您的回答解决了我的问题。

" MonoDevelop will be creating a .Net executable from your code when you hit 'build' or 'run'. This will be stored somewhere (usually within a bin folder within your project directory somewhere). So you will have an executable already " 当您点击'build'或'run'时,MonoDevelop将通过您的代码创建一个.Net可执行文件。它将存储在某个位置(通常存储在项目目录中某个位置的bin文件夹中。),因此您已经有了一个可执行文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM