How to call a console app recursively with arguments?
<p>I would like to have a console app that is passed in a arg to be able to call itself passing in the same command arg that was sent in initially.</p>

<p>If I try this however </p>

<pre><code>static void Main(string[] args)
{
    Assembly ass = System.Reflection.Assembly.GetExecutingAssembly();
    string cmd = Environment.CommandLine;

    Process again = new Process();
    again.StartInfo.FileName = ass.Location;
    again.StartInfo.Arguments = args[0];
    Console.WriteLine("Running with: " + args[0]);
    System.Threading.Thread.Sleep(10000);
    again.Start();
    return;
}
</code></pre>

<p>The initial call print "running with: Argument1" but the second call fails because the args array is empty. </p>
