读取文本行
public static string gettextbyline(int line)
{
StreamReader sr = new StreamReader("connectionString.do", Encoding.GetEncoding("GB2312"));
String strline;
TextBox textBox1 = new TextBox();
while ((strline = sr.ReadLine()) != null)
{
textBox1.Text += strline.ToString() + "\r\n";
}
return textBox1.Lines[line - 1].ToString();
}