I am needing a little help on how to create dynamic object names for a listview of unknown size.
I have the following and I know I am close I just can not figure out how to increment the object names.Code:ColumnHeader dynamicName = new ColumnHeader();
Code:int i = 0; while (i != j) { string myObject = "myObject" + i.ToString(); MessageBox.Show(myHeadings[i].ToString()); //just for testing to see the data MessageBox.Show(myObject); //just for testing to see the data i++; ColumnHeader myObject//<-- what I have issues with // = new ColumnHeader(); listView1.Columns.Add(myHeadings[i].ToString(),200); }




Reply With Quote