string str = this.txtNames.Text.Trim(); string[] result = str.Replace("/r", string.Empty).Split(new char[] { '/n' });