PHP to C#.NET/ASP.NET
<p>How to write this in C #? Can you use Dictionary to this?</p>

<pre><code>$count = 0;
if(count($_SESSION['goods']) &gt; 0) {
   $count = count($_SESSION['goods']) -1; // array start on zero.
}

$_SESSION['goods'][$count]["products_id"] = $_POST["products_id"];
$_SESSION['goods'][$count]["price"] = $_POST["price"];
$_SESSION['goods'][$count]["number"] = $_POST["number"];
</code></pre>
