当前位置:网站首页>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);
边栏推荐
- A ZABBIX self discovery script (shell Basics)
- Floyd
- ModuleNotFoundError: No module named ‘numpy‘
- Using Matplotlib to add an external image at the canvas level
- 2022.1.24
- Introduction to classification data cotegory and properties and methods of common APIs
- 2.9 learning summary
- 1.11 learning summary
- Image translation /gan:unsupervised image-to-image translation with self attention networks
- Zuul 實現動態路由
猜你喜欢

A company crawling out of its grave

ROS 笔记(07)— 客户端 Client 和服务端 Server 的实现

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

86. (cesium chapter) cesium overlay surface receiving shadow effect (gltf model)

1.18 learning summary

1.16 learning summary

Zuul 實現動態路由

1.19 learning summary

1.17 learning summary

LeetCode 19. Delete the penultimate node of the linked list
随机推荐
Anti withdrawal test record
天才制造者:独行侠、科技巨头和AI|深度学习崛起十年
A new paradigm for large model application: unified feature representation optimization (UFO)
pycharm 导包错误没有警告
Multipass Chinese document - setup driver
Multipass中文文档-设置驱动
2.< tag-动态规划和常规问题>lt.343. 整数拆分
Solution to back-off restarting failed container
[H5 development] 03- take you hand in hand to improve H5 development - single submission vs batch submission with a common interface
Numpy random number
Zuul 實現動態路由
ModuleNotFoundError: No module named ‘numpy‘
Simple application of KMP
dijkstra
6.1 - 6.2 公鑰密碼學簡介
How MySQL deletes all redundant duplicate data
Final review of brain and cognitive science
Sort query
YOLOV5训练结果的解释
Yolov5 super parameter setting and data enhancement analysis