C#中string與byte[]格式互轉
實現功能:
1,string轉byte[]格式
2,byte[]格式轉成string格式
轉換代碼如下:
//byte[]格式轉成string格式 stringstr = Encoding.UTF8.GetString(bytes) //string轉byte[]格式 bytes = Encoding.Default.GetBytes(str)
原文鏈接:C#中string與byte[]格式互轉
C#中string與byte[]格式互轉
實現功能:
1,string轉byte[]格式
2,byte[]格式轉成string格式
轉換代碼如下:
//byte[]格式轉成string格式 stringstr = Encoding.UTF8.GetString(bytes) //string轉byte[]格式 bytes = Encoding.Default.GetBytes(str)
原文鏈接:C#中string與byte[]格式互轉
版權所屬: hnxxbl.cn
本文鏈接: http://hnxxbl.cn/articleinfo/171/
特別聲明:如需轉載,請以鏈接形式注明本文出處!
QQ技術群:308250404
投稿郵箱:post@jsons.cn
針對有價值的原創(chuàng)技術投稿予以一定稿酬
期待有獨特技術、獨特想法的你來加入!