hey,
I am inserting a names in a textbox one by one and I would like to randomise a name in the arraylist. Can anyone help me continue this bit with randomising please
Thanks
Code:namespace Arraylist1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } string nums; ArrayList m_text = new ArrayList(); string text_line; private void button1_Click(object sender, EventArgs e) { text_line = textBox1.Text; if( text_line != null ) { // insert the line at the back of the container m_text.Add( text_line ); nums = Convert.ToString(m_text.Count); textBox1.Text = ""; } } private void button2_Click(object sender, EventArgs e) { // let's see how many we actually added ... MessageBox.Show("We inserted" + nums + " items"); ******************* } } }





Reply With Quote