string input = "Hello World!";
char[] values = input.ToCharArray();
foreach (char letter in values)
{
    // Get the integral value of the character.
    int value = Convert.ToInt32(letter);
    // Convert the decimal value to a hexadecimal value in string form.
    string hexOutput = String.Format("{0:X}", value);
    Console.WriteLine("Hexadecimal value of {0} is {1}", letter, hexOutput);

以上为字符转为16进制; 

相关文章:

  • 2021-12-10
  • 2021-11-03
  • 2022-12-23
  • 2021-12-08
  • 2021-12-23
  • 2021-11-26
  • 2022-12-23
  • 2021-09-14
猜你喜欢
  • 2021-12-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-01
相关资源
相似解决方案