List<MyClass> classes = new List<MyClass >(10); for (int k = 1; k < 6; k++) { MyClass d = new MyClass(k.ToString(), String.Format("name-{0}", k)); classes.Add(d); } listBox1.DataSource = classes; listBox2.DataSource = classes;