一個文件到了文件尾怎麼到文件頭。(代碼如下)
FileStream fsOne=new FileStream(PathName,FileMode.Open,FileAccess.Read);
FileStream fsTwo=new FileStream(PathName,FileMode.Open,FileAccess.Read);
StreamReader srOne=new StreamReader(fsOne);
StreamReader srTwo=new StreamReader(fsTwo);
string strOne,strTwo;
while((strOne=srOne.ReadLine())!=null)
{
寫代碼
while(srTwo.Peek()>=0)
{
寫代碼
}
}
FileStream fsOne=new FileStream(PathName,FileMode.Open,FileAccess.Read);
FileStream fsTwo=new FileStream(PathName,FileMode.Open,FileAccess.Read);
StreamReader srOne=new StreamReader(fsOne);
StreamReader srTwo=new StreamReader(fsTwo);
string strOne,strTwo;
while((strOne=srOne.ReadLine())!=null)
{
寫代碼
while(srTwo.Peek()>=0)
{
寫代碼
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货