〉〉〉〉〉文件流读取的问题〈〈〈〈〈 不能跳,你读到POINT后,可以ReadLine(),ReadLine()两次,取后面的那一次就得到100.00,然后再执行两次ReadLine就得到了112.35 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 读两个空行: FileStream myfs=new FileStream(@"f:\dazhu.txt",FileMode.Open,FileAccess.Read); StreamReader myreader=new StreamReader(myfs); string s=String.Empty; string s1,s0,s2; while((s=myreader.ReadLine())!=null) { if(s=="POINT") { s0=myreader.ReadLine(); s1=myreader.ReadLine(); s0=myreader.ReadLine(); s2=myreader.ReadLine(); this.richTextBox1.Text=s1+"\r\n"+s2; } } 什么时候才能 摆脱SQL语句的烦恼? (急切求助)日期字符串转换及代理服务问题(在线等) 那种保存文件的方式好? 如何把richtextbox中的内容写入txt文件 同义词添加查询设计思路 20分+3个月qq会员求一基础问题 两小时内结帖 哪里有关于mapinfo方面的书 vs.net制作web安装程序 id 唯一性问题.急 就C#的语法有几点疑惑,请教高手 如何判断一个string是否可以转换为数字? 巨菜的入门问题有几个人知?关于null值
FileStream myfs=new FileStream(@"f:\dazhu.txt",FileMode.Open,FileAccess.Read);
StreamReader myreader=new StreamReader(myfs);
string s=String.Empty;
string s1,s0,s2;
while((s=myreader.ReadLine())!=null)
{
if(s=="POINT")
{
s0=myreader.ReadLine();
s1=myreader.ReadLine();
s0=myreader.ReadLine();
s2=myreader.ReadLine();
this.richTextBox1.Text=s1+"\r\n"+s2;
}
}