ArgumentNullException in an array that I can't figure out
<p>I have been up half the night and still trying to get this null exception figured out. I have read a few of texts about this issue but none has helped me in any way, to me what the problem is as it should work :/  It just crashes at this piece of code:</p>

<pre><code>Private void UpdateGUI()
{
    string selectedItem  = cmbDisplayOptions.Items[cmbDisplayOptions.SelectedIndex].ToString();
    rdbtReserv.Checked = true;            
    lstReservations.Items.Clear();           
    lstReservations.Items.AddRange(m_seatMngr.GetSeatInfoStrings(selectedItem));
}
</code></pre>

<p><code>lstReservations.Items.AddRange(m_seatMngr.GetSeatInfoStrings(selectedItem));</code> Gives me the ArgumentNullExeption, but to me it should not do that.</p>

<p>the addrange sends string selectedItem to another class:</p>

<pre><code>    public string[] GetSeatInfoStrings(string selectedItem)
    {
        int count = GetNumOfSeats(selectedItem);

        if (count &lt;= 0)
        {
            return null;
        }

        string[] strSeatInfoStrings = new string[count];

        for (int index = 0; index &lt;= m_totNumOfSeats - 1; index++)
        {
            strSeatInfoStrings[index] = GetSeatInfoAt(index); 
        }

        return strSeatInfoStrings;

    }
</code></pre>

<p>This <code>int count = GetNumOfSeats(selectedItem);</code> goes to here and returns with an int:</p>

<pre><code>    private int GetNumOfSeats(string selectedItem)
    {
        if (selectedItem == "ReservedSeats")
        {
            return GetNumReserved();
        }
        if (selectedItem == "VacantSeats")
        {
            return GetNumVacant();
        }
        else
        {
            return m_totNumOfSeats;
        }
    }
</code></pre>

<p>I have checked the arrayed have the correct number of spaces(60) and that <code>selectedItem</code> has a string(Allseats to start with so it should return <code>m_totnumOfSeats</code> which is an int of 60) But then in the <code>private int GetNumOfSeats</code> something goes wrong and it returns null and...well why? </p>

<p>I can't see the problem.. maybe gone blind by trying to find the issue. Always got outstanding help here and I have learned tons!! So maybe someone can point out all the issues there is in my code. </p>

<p>Thanks a million in advance for any and all advice! </p>

<p>//Regards</p>
