<p>What is the proper way to load a <code>ListBox</code> in C# .NET 2.0 Winforms?</p>

<p>I thought I could just bind it to a <code>DataTable</code>. No such luck.<br>
I thought I could bind it with a <code>Dictionary</code>. No luck.  </p>

<p>Do I have to write an class called <code>KeyValuePair</code>, and then use <code>List&lt;KeyValuePair&gt;</code> just to be able to load this thing with objects? Maybe I am missing something obvious. I want my display text and values to be different values.</p>

Lets assume your data type is called MyDataType. Implement ToString() on that datatype to determine the display text. e.g.:
```
```
class MyDataType
{
  public string ToString()
  {
    //return the text you want to display
  }
}
```
```
Then you can take a list consisting of your datatype and cram it into the ListBox via AddRange() as follows:
```
```
ListBox l;
List<MyDataType> myItems = new List<MyDataType>(); // populate this however you like
l.AddRange(myItems.ToArray());
```
```
Let me know if you need more help - it would help to know what datatype you are trying to display in the listbox.