标签: string numbers hex
我找到了一些密码
StringBuilder sb = new StringBuilder(); foreach(char c in num) { uint i = (uint)c; sb.AppendFormat("{0:X2}", (i & 0xff)); } Console.WriteLine("{0} is sb.ToString()",sb.ToString());
代码是将字符串转换为十六进制
但是为什么要使用代码(i&0xff)?