发布于2025年6月18日 由yue[C#]将0x01的string类型转换为数值 string hexString = “0x01”; int number = Convert.ToInt32(hexString, 16); Console.WriteLine(number); // 输出: 1