c# 文件流读写信息
来源:互联网 发布:vscode支持xp吗 编辑:程序博客网 时间:2024/06/06 02:32
string msg = "dhgfjdbghafj"; byte[] myByte = System.Text.Encoding.UTF8.GetBytes(msg); //向流中写入信息 using (FileStream fsWrite = new FileStream(@"D:111.txt", FileMode.OpenOrCreate, FileAccess.Write)) { fsWrite.Write(myByte,0,myByte.Length); } //读文件 using (FileStream fsRead = new FileStream(@"D:111.txt", FileMode.OpenOrCreate, FileAccess.Read)) { int mylength = (int)fsRead.Length; byte[] heByte = new byte[mylength]; int r = fsRead.Read(heByte,0,heByte.Length); string myStr = System.Text.Encoding.UTF8.GetString(heByte); Console.Write(myStr); Console.ReadKey(); }
1 0
- c# 文件流读写信息
- c#文件流读写
- c# 读写配置信息
- C#文件的读写 -流
- C# 文件流读写记事本
- C# FileStream流文件读写
- C#读写文件流方法
- C#的文件读写操作--流方式一次读写文件
- C#常用IO流与读写文件
- C#读写INI文件
- C#读写INI文件
- C#读写INI文件
- C#读写INI文件
- c#读写xml文件
- c#读写xml文件
- c#读写xml文件
- C#读写文件
- C# 文件读写
- 基于数据驱动的框架具体的学习点
- 构建android上多媒体apk
- send(),recv()函数详解
- Runable和thread的区别(多线程必须用Runable)
- win7+python3.4 +nltk搭建自然语言处理环境
- c# 文件流读写信息
- jetty官方文档翻译第一章
- 检测点12.1
- LayoutInflater.from(this) 这个this是什么,加载完后的View 就是谁的。
- 自定义tableview cell
- 细说#Pragma Pack(n)与内存对齐
- setsockopt()函数使用详解
- CSAPP: Bomb Lab(1)
- 欢迎使用CSDN-markdown编辑器