1   string   to   byte  
  string   str   =   "your   string"   ;  
  byte[]   bytes   =   System.Text.Encoding.ASCII.GetBytes(str);  
   
  2   bytes   to   string  
   
  byte[]   bytes   =   new   byte[255]   ;  
  ......  
  string   str   =   System.Text.Encoding.ASCII.GetString(bytes,0,bytes.Length);  
   
  还可以用其他编码     UTF7,UTF8,Unicode   等

相关文章:

  • 2022-12-23
  • 2023-02-10
  • 1970-01-01
  • 2022-12-23
  • 2022-12-23
  • 2021-12-20
  • 2022-12-23
  • 2021-11-12
猜你喜欢
  • 2021-10-11
  • 2022-01-04
  • 2021-07-21
  • 2021-11-19
相关资源
相似解决方案