As an old C++ programmer I am struggling with some C# issues. I want to reduce the redundancy in setting up a ListView. So I tried the code below. I get a null reference error, but I do not understand why. The compiler has no problem with me creating an array of ListViewItems, but I don't see how to use them.
Thanks, Russ
ListViewItem [] items = new ListViewItem [12];
for (int i=0; i < 12; ++i) {
items [i].Text = string.Format ("F{0}", i+1);
}