Kee said:
Hi Marc
Thanks for your class sample, however, it is a bit beyond what I needs ,
it is partly because I need the application working in cygwin enviroment
and co-work with unix utility.
So, a command option parser and a class adapter with the basic "stdin"
"stdout" and "stderr" is prefered.
Kee
Without knowing what command parsing means to you, here is an expanded
example using stdin, stdout and stderr. Of course you should check the
argument count before using it.
class Program {
static void Main() {
System.Console.Out.WriteLine("Arg [1]: " +
Environment.GetCommandLineArgs() [1]);
System.Console.WriteLine("Hello world");
System.Console.Error.WriteLine("Hello, stderr");
string input = System.Console.In.ReadLine();
}
}