Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void with_Items_AddRange_DataSource()
- {
- string[] x = new string[4];
- x[0] = "1";
- x[1] = "2";
- x[2] = "11";
- x[3] = "22";
- //listBox1.Items.AddRange(x);// by default no item is selected
- listBox1.DataSource = x; // by default the first item is selected
- }
- void with_Items_Add()
- {
- string[] x = new string[4];
- x[0] = "1";
- x[1] = "2";
- x[2] = "11";
- x[3] = "22";
- for (int i = 0; i < x.Length; i++)
- listBox1.Items.Add(x[i]); // by default the first item is selected
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement