本文介绍了将uint32转换为char数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无论如何在c#中将Uint32数据转换为char数组。



i在uint32中的数据是0x000010001U。

Is anyway in c# to convert Uint32 data into char array.

i have data in uint32 is 0x000010001U.

推荐答案

uint32 myVal = 0x00010001;
string hexVal = myVal.ToString("X8");
char[] hexCharArray = hexVal.ToCharArray();
char[] decCharArray = myVal.ToString().ToCharArray();





hexCharArray = {'0','0','0','1','0','0','0','1'}

decCharArray = {'6','5','5','3','7'}



hexCharArray = { '0', '0', '0', '1', '0', '0', '0', '1' }
decCharArray = { '6', '5', '5', '3', '7' }


这篇关于将uint32转换为char数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-29 08:59