I want to add the items from the list box into a string array
However, when I run the code I get a Null Reference Exception on the variable declaration. Any ideas?
List items; string[] array;
public MainWindow()
{
InitializeComponent();
items = new List<String>();
listBox.Items.Add("Kevin");
listBox.Items.Add("James");
listBox.Items.Add("John");
listBox.Items.Add("Mathew");
listBox.Items.Add("George");