title: How to handle this ArgumentOutOfRangexception?
body: <p>I'm trying to make a program that reads a file with 50 random words, it stores the words with 3 letters or less in a list called SmallWords and the words with 4 letters or more in a list called LargeWords. I'm using Windows Forms and  I have a ListView control with 2 columns... 'Small Words' and 'Large Words'. It seems obvious that what I want to do is just put the words in its corresponding column. The thing is that the file doesn't have like 25 small and 25 large words, you know? Maybe it has 30 small words and 20 large words, so when I do this loop to add items to the ListView, it throws this exception:</p>
  
  <p>ArgumentOutOfRangeException.</p>
  
  <p>This is my code</p>
  
  <pre><code>var MaxNum = Math.Max(SmallWords.Count, LargeWords.Count);
  
  for (var index = 0; index &lt; MaxNum; index++)
  {
       ListViewItem item = new ListViewItem(SmallWords[index]);
       item.SubItems.Add(LargeWords[index]);
       listView1.Items.Add(item);
  }
  </code></pre>
  
  <p>The exception is thrown at this line <code>item.SubItems.Add(LargeWords[index]);</code></p>
  
  <p>Is there a way to handle this? Or like another way to add the items to the columns? I know it works because if change <code>Math.Max(...);</code> to <code>Math.Min(...)</code> it adds the words but just the 20 large words and 20 small words, I'm going to be missing 10 small words in the SmallWords column.</p>
  
  <p>Thanks</p>