using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IO
{
class Program
{
static void Main(string[] args)
{
FileStream f=new FileStream("/Net/IO/IO/Log/test.txt",FileMode.OpenOrCreate,FileAccess.ReadWrite);
for (int i = 0; i < f.Length; i++)
{
byte[] b=new byte[1024];
UTF8Encoding temp=new UTF8Encoding(true);
while (f.Read(b,0,b.Length)>0)
{
Console.WriteLine(temp.GetString(b));
}
}
Console.ReadKey();
}
}
}
IO FileStream的使用
最新推荐文章于 2024-03-01 22:12:27 发布