当前位置:网站首页>C# string与stream的相互转换
C# string与stream的相互转换
2022-08-11 01:19:00 【※※冰馨※※】
string test = “This is string″;
// convert string to stream
MemoryStream stream = new MemoryStream();
StreamWriter writer = new StreamWriter( stream );
writer.Write( test );
writer.Flush();
// convert stream to string
stream.Position = 0;
StreamReader reader = new StreamReader( stream );
string text = reader.ReadToEnd();
边栏推荐
- Mysql database installation and configuration detailed tutorial
- Linux install redis database
- 分库分表ShardingSphere-JDBC笔记整理
- 络达开发---串口日志&日志过滤
- Mysql数据库安装配置详细教程
- url转成obj或者obj转成url的方法
- 微服务概念
- 数据分析面试手册《统计篇》
- Apache Commons Configuration Remote Code Execution Vulnerability (CVE-2022-33980) Analysis & Reproduction
- 总结Qt中常用文件信息QFileInfo的获取:后缀,名称,路径,链接
猜你喜欢
随机推荐
BEVDepth: Acquisition of Reliable Depth for Multi-view 3D Object Detection Paper Notes
MSTP - Multiple Spanning Tree (Case + Configuration)
apache+PHP+MySQL+word press,安装word press时页面报错?
SAP ABAP JSON 格式数据处理
MySQL索引与事务
两日总结十
力扣------用栈操作构建数组
Sub-database sub-table ShardingSphere-JDBC notes arrangement
Data Analysis Interview Manual "SQL"
Shell 文本三剑客 Sed
networkmanager无法打开
两日总结九
构建资源的弹性伸缩
成功解决TypeError: can‘t multiply sequence by non-int of type ‘float‘
迭代器和生成器
微信小程序获取当前页面的url和参数
Kunpeng compilation and debugging and basic knowledge of native development tools
异常:try catch finally throws throw
WinForm (5) control and its members
② 关系数据库标准语言SQL 数据定义(创建、修改基本表)、数据更新(增删改)