ColinOL

A Small Website

用户工具

站点工具


wiki:csharp:base-string-2-bytes-stream

字符串 string 转为byte[] 保存在 Stream 中

string strdata = "Hello World";
byte[] bytes = System.Text.Encoding.ASCII.GetBytes(strdata);
Stream stream = new MemoryStream(bytes);
wiki/csharp/base-string-2-bytes-stream.txt · 最后更改: 2018/02/03 20:42 (外部编辑)