c# Regex.Matches html input like php preg_match_all
<p>html source</p>

<pre><code>&lt;form&gt;
&lt;input type="text" name="a" value="a1fa4" type="hidden"/&gt;
&lt;input type="text" name="b" value="b1fa9" type="hidden"/&gt;
&lt;input type="text" name="c" value="c1fd2" type="hidden"/&gt;
&lt;input type="text" name="d" value="d1fx1" type="hidden"/&gt;
&lt;/form&gt;
</code></pre>

<p>php source</p>

<pre><code>&lt;?php
  preg_match_all('/&lt;input name="(.*?)" value="(.*?)" type="hidden"\/&gt;/i', $form, $input);

  $var = array();

  for($i=0;$i&lt;count($input[1]);$i++){
    $var[$input[1][$i]] = $input[2][$i];
  }
?&gt;
</code></pre>

<p>C# source</p>

<pre><code>Match match = Regex.Match(html, "&lt;input name=\"(.*?)\" value=\"(.*?)\" type=\"hidden\"/&gt;", RegexOptions.IgnoreCase );
while (match.Success)
{
    System.Console.WriteLine(" {0} {1} ", match.Value, match.Index);  
}
</code></pre>

<p>The php code works, but the c# code does not work. how can I fix the c# code? 
thanks!</p>
