// Create a string array and store the contents of the Lines property. string[] tempArray = new string [textBox1.Lines.Length]; tempArray = textBox1.Lines;