假设我的字符串是 "John Doe"
"John Doe"
如何将其转换为字节数组?
目前我只有将 转换string为字节数组的代码,但是如何将 i 转换为空终止字节数组?
string
byte[] bytes = Encoding.ASCII.GetBytes("John Doe");
提前致谢
.net c# arrays type-conversion
.net ×1
arrays ×1
c# ×1
type-conversion ×1