• 在c# 中 如何把字符串转化为二进制形式?


    string text = "中国,加bai油!";
    //以UTF8编码du方式zhi,转化为字节数dao组zhuan。
    byte[] binaryBytes = System.Text.Encoding.UTF8.GetBytes( text );
    //以UTF8编码方式,把字节数组还原为字符串shu。
    string newText = System.Text.Encoding.UTF8.GetString( binaryBytes );

    UnicodeEncoding aa = new UnicodeEncoding();
    byte[] pwd = aa.GetBytes("aaa");

  • 相关阅读:
    虚拟机网络配置常见问题总结
    Python
    Python
    Python
    Python
    Python
    Python
    MySQL
    MySQL
    MySQL
  • 原文地址:https://www.cnblogs.com/sunny3158/p/14435968.html
Copyright © 2020-2023  润新知