title: How to remove the element from List in C#?
body: <p>I got a liiitle problem.</p>
  
  <p>There is</p>
  
  <pre><code>List&lt;List&lt;UInt32&gt;&gt; temp = new List&lt;List&lt;UInt32&gt;&gt;();
  </code></pre>
  
  <p>For example,</p>
  
  <p>there are two <code>List&lt;UInt32&gt;</code> records within the List temp however, when i try to do something like <code>temp.removeAt(0);</code> it doesn't remove the first row <code>(List&lt;UInt32&gt;</code>) .. Why is that? Do i do something wrong?</p>
  
  <p><strong>Update</strong></p>
  
  <p>Here is the code that doesn't work. I know there are 2 <code>List&lt;UInt32&gt;</code> within the main List and I know that the first <code>List&lt;UInt32&gt;.Count</code> is 1 but when I check the same position after this code, the first code's Count is still one.</p>
  
  <pre><code>                        int i = 0;
                          bool boolA = true;
  
                          while (boolA)
                          {
                              if (temp[i].Count == 1) 
                              {
                                  temp.RemoveAt(i);
                                  temps++; 
                              }
  
                              if (i == temp.Count - 1) boolA = false;
                              i++;
  </code></pre>