How to run a c# application with arguments from a batch file
c#, console-application
Solution
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);
}
}
Problem
I have a C# project that takes in arguments that I'm trying to run from a bat file. For an application that doesn't take arguments I just put the following inside a file called run.bat ``` pathname\helloworld\bin\Debug\helloworld.exe ``` What if my program takes in parameters, how do I adjust. When is the echo of used? any good tutorial on writing batch files? Thanks