How to run a program with arguments using MONO?

I have a program that accepts input arguments:

$ myProgram.exe -arg1 -arg2 -arg3 

on windows, which works fine. I want to run this via MONO on linux. How to do it?

 $ mono myProgram.exe 

starts the program, but how to pass the tags arg1 , arg2 and arg3 to myProgram.exe using MONO?

Thanks in advance!

+6
source share
1 answer

According to the mono wiki syntax for calling mono:

 mono [options] file [arguments...] 

I think options are options for mono, and arguments are arguments for the program you want to run. So just do it:

 mono myProgram.exe arg1 arg2 arg3 

You can also execute it without explicitly calling mono. This works on some platforms and not on others:

 ./myProgram.exe arg1 arg2 arg3 
+8
source

Source: https://habr.com/ru/post/891352/


All Articles