listBox1.Items.Clear(); listBox1.Items.Add( "One" ); listBox1.Items.Add( "Two" ); listBox1.Items.Add( "Three" );, or (from array):
listBox1.Items.Clear();
   
String[] sArray = { "One", "Two", "Three" };
listBox1.Items.AddRange( sArray );
, orlistBox1.DataSource = new string[] { "One", "Two", "Three" };
Output: 
No comments:
Post a Comment