Luk*_*akk 3 c# console-application
我有一个C#项目,它接受我试图从bat文件运行的参数.对于不带参数的应用程序,我只需将以下内容放在名为run.bat的文件中
pathname\helloworld\bin\Debug\helloworld.exe
Run Code Online (Sandbox Code Playgroud)
如果我的程序接收参数怎么办,我该如何调整.什么时候使用回声?关于编写批处理文件的任何好教程?谢谢
pathname\helloworld\bin\Debug\helloworld.exe "argument 1" "argument 2" 3
using System;
public class Demo {
public static void Main(string[] args) {
foreach(string arg in args)
Console.WriteLine(arg);
}
}
Run Code Online (Sandbox Code Playgroud)