惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Privacy & Cybersecurity Law Blog
V
V2EX
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Register - Security
The Register - Security
MongoDB | Blog
MongoDB | Blog
P
Privacy International News Feed
The Last Watchdog
The Last Watchdog
Security Archives - TechRepublic
Security Archives - TechRepublic
美团技术团队
Stack Overflow Blog
Stack Overflow Blog
博客园 - 司徒正美
博客园 - 三生石上(FineUI控件)
V
Visual Studio Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
K
Kaspersky official blog
S
Secure Thoughts
T
Tenable Blog
Security Latest
Security Latest
The Cloudflare Blog
S
Security @ Cisco Blogs
H
Heimdal Security Blog
aimingoo的专栏
aimingoo的专栏
TaoSecurity Blog
TaoSecurity Blog
Blog — PlanetScale
Blog — PlanetScale
Microsoft Security Blog
Microsoft Security Blog
Schneier on Security
Schneier on Security
Webroot Blog
Webroot Blog
G
Google Developers Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Scott Helme
Scott Helme
IT之家
IT之家
Latest news
Latest news
The Hacker News
The Hacker News
C
Check Point Blog
T
The Exploit Database - CXSecurity.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More
腾讯CDC
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
N
News | PayPal Newsroom
Forbes - Security
Forbes - Security
P
Palo Alto Networks Blog
S
Security Affairs
S
Securelist
Google Online Security Blog
Google Online Security Blog
WordPress大学
WordPress大学
Last Week in AI
Last Week in AI
C
Cybersecurity and Infrastructure Security Agency CISA
A
About on SuperTechFans

博客园 - showonce

使用群晖的SynologyDrive同步本地文件到NAS时如何设置过滤某些文件夹的方法 群晖通过 acme.sh 申请 ZeroSSL 泛域名证书(适配 80 端口封锁)+ 自动续期同步完整步骤 关于投影机通过TCP网络控制开关机的一些设置 关于电脑按下开机按钮或重启按钮后,电脑没有进入到windows系统桌面,而是进入到蓝屏恢复界面的解决方法 申请个人版的SSL证书(免费的) 第一次接触json所需要的知识总结,用在C#中 Unity开发时,在visual studio编辑器中没有中文注释的解决办法 关于Unity的Android工程,写文件的问题 Unity关于引用.Net或其他C# dll的问题。(我是用的版本是2018.3) 群晖系统,为域名添加证书,以及怎么申请免费的证书 Unity插件DOTween中的中的Ease 首次在macbook使用unity开发遇到的一些列问题 关于使用云服务器做广域网通讯测试的资料整理 二进制、六进制、八进制、十进制、十六进制等之间的转换规则 Unity中使用PersistentDataPath加载文件 在VS里编辑unity代码调用系统方法不显示中文注释或英文注释 打开本地【C】【D】【E】驱动器时候提示 X:\ 找不到应用程序 - showonce windows系统开机启动一个程序的方法-总结 vlc的几种播放状态
C#进制转换
showonce · 2021-12-15 · via 博客园 - showonce

字符串转十进制

string data = "01 06 00 AA 00 03 E9 EB";
data = data.Replace(" ", "");
byte[] orderBytes = new byte[data.Length / 2];
for (int i = 0; i < orderBytes.Length; i++)
{
    orderBytes[i] = Convert.ToByte(data.Substring(i * 2, 2), 16);
}

十进制转十六进制

string strHex = "";
for(int i=0;i<orderBytes.Length;i++)
{
    strHex+=string.Format("{0:x}",orderBytes[i]).ToString().PadLeft(2, '0');
}

posted @ 2021-12-15 11:18  showonce  阅读(110)  评论(0)    收藏  举报