开发者

c# convert string to dword hex

开发者 https://www.devze.com 2023-04-01 09:10 出处:网络
Can anyone help me how to convert string value to dword hex for example: string i = \"1\"; uin开发者_StackOverflow社区t32 m = ....

Can anyone help me how to convert string value to dword hex for example:

string i = "1";
uin开发者_StackOverflow社区t32 m = ....
m.toString(X8);

so that: m = 00000001


string i = "1";
UInt32 m;
UInt32.TryParse(i, out m);
string result = m.ToString("X8");

or

string result = Convert.ToUInt32("1").ToString("X8");
0

精彩评论

暂无评论...
验证码 换一张
取 消