How to get a collection of lines in a WPF TextBox

The following code will load lines in a string collection.

StringCollection lines = new StringCollection();
int lineCount = textBox1.LineCount;

for (int line = 0; line < lineCount; line++)
lines.Add(textBox1.GetLineText(line));

return lines;