当前位置:网站首页>C# 39. string类型和byte[]类型相互转换(实测)
C# 39. string类型和byte[]类型相互转换(实测)
2022-06-26 05:02:00 【lljss2020】
byte[] byteArray0 = System.Text.Encoding.Default.GetBytes("01A中国");
byte[] byteArray1 = System.Text.Encoding.ASCII.GetBytes("01A中国");
string str01 = System.Text.Encoding.Default.GetString(byteArray0);
string str02 = System.Text.Encoding.ASCII.GetString(byteArray0);
string str11 = System.Text.Encoding.Default.GetString(byteArray1);
string str12 = System.Text.Encoding.ASCII.GetString(byteArray1);

所以一般用
byte[] byteArray0 = System.Text.Encoding.Default.GetBytes("01A中国");
string str01 = System.Text.Encoding.Default.GetString(byteArray0);
边栏推荐
- 2022.2.10
- 钟珊珊:被爆锤后的工程师会起飞|OneFlow U
- Multipass Chinese document - setup driver
- Interpretation of yolov5 training results
- MySql如何删除所有多余的重复数据
- A new paradigm for large model application: unified feature representation optimization (UFO)
- Mise en œuvre du routage dynamique par zuul
- 2022.1.23
- 微信小程序保存图片的方法
- [H5 development] 03- take you hand in hand to improve H5 development - single submission vs batch submission with a common interface
猜你喜欢

ModuleNotFoundError: No module named ‘numpy‘

torchvision_transform(图像增强)

DBeaver 安装及配置离线驱动
![[H5 development] 03- take you hand in hand to improve H5 development - single submission vs batch submission with a common interface](/img/37/84b7d59818e854dac71d6f06700cde.jpg)
[H5 development] 03- take you hand in hand to improve H5 development - single submission vs batch submission with a common interface

为什么许多shopify独立站卖家都在用聊天机器人?一分钟读懂行业秘密!

图像翻译/GAN:Unsupervised Image-to-Image Translation with Self-Attention Networks基于自我注意网络的无监督图像到图像的翻译

LeetCode 19. Delete the penultimate node of the linked list

Zuul implements dynamic routing

Zuul 實現動態路由

6.1 - 6.2 introduction to public key cryptography
随机推荐
UWB超高精度定位系统架构图
Nabicat connection: local MySQL & cloud service MySQL and error reporting
Use fill and fill in Matplotlib_ Between fill the blank area between functions
天才制造者:独行侠、科技巨头和AI|深度学习崛起十年
Pycharm package import error without warning
Status of processes and communication between processes
2022.1.24
6.1 - 6.2 公鑰密碼學簡介
微信小程序保存图片的方法
Multipass中文文档-设置驱动
Method of saving pictures in wechat applet
Use of better scroll
ModuleNotFoundError: No module named ‘numpy‘
0622-马棕榈跌9%
Numpy general function
UWB超高精度定位系统原理图
Resample
ThreadPoolExecutor implements file uploading and batch inserting data
Numpy index and slice
Multipass中文文档-使用实例命令别名