ListItem item = new ListItem(); item.Value = "option1"; item.Text = "Option 1";
ListBox myList = new ListBox(); myList.Items.Add(new ListItem("option1", "Option 1"));This code snippet creates a new ListBox control and adds a new ListItem with a value of "option1" and a display text of "Option 1" to it. This library is a part of the Chummer package.