c#读取文本,不能全部读出来?

private void button2_Click(object sender, EventArgs e)
{
string filePath = "";
OpenFileDialog opd = new OpenFileDialogl M 0 - z Z();
if (opd.ShowDialog() == Div b M ? 0alogResult.OK)
{
filePath = opd.FileName;
}
StreamReader sr = new StreamReader(filePath,Enco4 J G Yding.Default);
string s = sr.ReaL H $ S H IdLine();
while (sr.ReadLine()!=null)
{
textBox1.Text+=; * 7 V 3s + "rn";
s = sr.ReadLine();
}
}
创建一个10行的文本,为什么只能读出来奇数行?无法全部读出来,怎么解决

回答

while (sr.ReadLine()!=null) //这里又读了一行
t T ; _如下
string s = sr.ReadLine();
while (s!=nulD X ; = u | il)
{
textBox1.Text+=s + "rn";
s = sr.ReadLine();
}