Selected index for multiple listboxes
<p>I'm writing a program that requires a user to enter information for either their house or apartment.  They will enter information on property id, address, year build, bedrooms, square footage, and price. Once they've done that they choose to either enter yes or no for "furnished"(this applies to apartment) or they can enter a number for garage capacity(this applies to house).  I have a method called DisplayInfo() that shows all this information in a column.  The program has two listboxes at the bottom, one for apartment and one for house.  There are also two buttons, one for add house and one for add apartment.  This button will add the address to the respective listbox.  The problem i'm having is that on the final button called display, the selected house or apartment should be shown in a messagebox that shows all the information using DisplayInfo().  this is what i have right now</p>

<p>this is the DisplayInfo() method</p>

<pre><code>        public virtual string DisplayInfo()
    {
        return string.Format("Property ID: {0}\nProperty Address: {1}\nYear Built: {2}\nNumber of Bedrooms: {3}\nSquare Footage: {4}\nPrice: {5}", GetID(),
            GetAddress(), GetYearBuilt(), GetBedrooms(), GetSquareFootage(), GetPrice());
</code></pre>

<p>this is what i have for displaying the messagebox and all it does is display each house or apartment input by the user in different messageboxes.</p>

<pre><code>         foreach (Property_Dwelling property in Home)
        {
            MessageBox.Show(property.DisplayInfo(), property.GetType().ToString(), MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
</code></pre>

<p>and </p>

<pre><code>        foreach (Property_Dwelling property in Home)
        {
            MessageBox.Show(property.DisplayInfo(), property.GetType().ToString(), MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
</code></pre>
