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

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

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

相关文章:

  • 2023-03-18
  • 2022-12-23
  • 2021-11-07
  • 2021-11-20
  • 2021-09-26
  • 2022-12-23
  • 2022-01-25
  • 2022-12-23
猜你喜欢
  • 2021-08-15
  • 2021-08-12
  • 2022-02-08
  • 2021-07-19
相关资源
相似解决方案