Writing list to CSV file
<p>I have a List of List of int called NN which i would like to write to a csv file like this:</p>

<pre><code>List&lt;List&lt;int&gt;&gt; NN = new List&lt;List&lt;int&gt;&gt;();
</code></pre>

<p>The NN list:</p>

<pre><code>1,2,3,4,5,6
2,5,6,3,1,0
0,9,2,6,7,8
</code></pre>

<p>And the output csv file should look like this:</p>

<pre><code>1,2,0
2,5,9
3,6,2
4,3,6
5,1,7
6,0,8
</code></pre>

<p>What is the best way to achieve that?</p>

<p>If there is a better representation you would recommend instead of the nested list i'll be glad to know. </p>

<p>(The purpose is that each list of int is the weights between the last and next layer in the neural network).</p>