C#: What is the appropriate C# manner to read argument/parameters in Console applications?
<p>What is the appropriate method to read arguments from command line? I've read of using strings args[] but I can't come to grasp the concept of how to do it properly.</p>

<p>Example Commands:</p>

<p>/animal dog -c white -s medium</p>

<p>/car civic -c green -y 1999</p>

<p>What would be the appropriate manner to read,</p>

<ol>
<li><p>/thecommand</p></li>
<li><p>all the other -letter arguments</p></li>
</ol>

<p>for easier manipulation? Or is there a cleaner way in general to do this than using args? Still not sure as to how args is used.</p>

<pre><code>    static void Main(string[] args)
    {

        Console.WriteLine("Welcome To The Application");

        Console.Write("Program&gt; "); // Expecting something such as: /animal dog -c brown -s medium
        string sInput = Console.ReadLine();

        // What would be an appropriate method to read 1. /thecommand then based on the command
        // maybe using switch, expect the arguments like -c brown -s medium or -c green -y 1999
        // and display them into the console?


        // if /animal is detected, display what would be:
        // Console.WriteLine("Animal: dog");
        // Console.WriteLine("Color: brown");
        // Console.WriteLine("Size: medium");

        // if /car is detected, display what would be:
        // Console.WriteLine("Car: civic");
        // Console.WriteLine("Color: green");
        // Console.WriteLine("Year: 1999");

    }
</code></pre>
