Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run a program with arguments with MONO?

I have a program that receives input arguments:

$ myProgram.exe -arg1 -arg2 -arg3

in Windows that works just fine. I want to run that through MONO in linux. How do I do that?

$ mono myProgram.exe

runs the program, but how do I pass the arg1, arg2 and arg3 to myProgram.exe using MONO?

Thanks in advance!

like image 944
Girardi Avatar asked Jun 25 '11 16:06

Girardi


1 Answers

According to the mono wiki, the syntax for invoking mono is:

mono [options] file [arguments...]

I think that options are options to mono, while arguments are arguments to the program you want to run. So just do this:

mono myProgram.exe arg1 arg2 arg3

You might also be able to execute it without explicitly calling mono. This works on some platforms and not on others:

./myProgram.exe arg1 arg2 arg3
like image 80
David Grayson Avatar answered Oct 18 '22 07:10

David Grayson