C#中字节数组byte[]和字符串string类型的相互转换

C#中字节数组byte[]和字符串string类型的相互转换:

string转byte[]:
byte[] byteArray = System.Text.Encoding.Default.GetBytes ( str );

byte[]转string:
string str = System.Text.Encoding.Default.GetString ( byteArray );
原文地址:https://www.cnblogs.com/ming-4/p/12204541.html