سؤال

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

string i = "1";
uint32 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");
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top