您的位置:首页 > 其它

读取二进制文件判断是否文件尾

2009-04-18 09:43 429 查看
public class ReadFile
{
public List<String> ReadType()
{
BinaryReader br = new BinaryReader(new FileStream("TypeInfo.dat", FileMode.Open, FileAccess.Read));
List<String> node = new List<string>();

byte[] farr = new byte[1024];
const int rbuffer = 1024;
while (br.Read(farr, 0, rbuffer) != 0)
{
string str = br.ReadString();
node.Add(str);
}

br.Close();
return node;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐