Create parameter String from an object

Sep 29, 2011 at 10:46 AM

I used this code for parsing the arguments from the command line:       

CommandLineParser.CommandLineParser parser = new CommandLineParser.CommandLineParser();
         MyCommandLineOption options = new MyCommandLineOption();

It would be helpfull if its possible to do this reverse for generating a command string:

MyCommandLineOption options = new MyCommandLineOption();
option.p1 = "Yes we can";
option.p2 = true;
String cmd = option.ToParameterString(); // cmd should be: "-p1 Yes we can -p2"

I can't find a method to do that!? Is this correct?

Best regards.

Feb 21, 2016 at 9:56 PM
Interesting idea, I might add it for the next release.
The project has been migrated to GitHub, please use it for tracking the project, getting information about new releases & reporting all potential issues.