编程论坛
注册
登录
编程论坛
→
ASP.NET技术论坛
[求助]FileStream问题
ruffianshen
发布于 2007-04-25 11:27, 518 次点击
怎么将一个文件读到一个数组里面了?
忘了怎么读了,呵呵!
1 回复
#2
IPV6
2007-04-25 13:06
看看这段代码吧
using(System.IO.StreamReader sr= new System.IO.StreamReader(path))
{
char[] c = null;
while(sr.Peek()>=0)
{
c = new char[5];
sr.Read(c,0,c.Length);
}
}
1