我有字符串:
46-C9-08-B6-E8-F3-47-CF-53-2A-77-02-C9-19-7F
我想把它变成一个数组,所以它看起来像这样:
{&H46, &HC9, &H8, &HB6, &HE8, &HF3, &H47, &HCF, &H53, &H2A, &H77, &H2, &HC9, &H19, &H7F}
完成的行将是这样的:
My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Bohemia Interactive Studio\ArmA 2 OA", "KEY", New Byte() {&H46, &HC9, &H8, &HB6, &HE8, &HF3, &H47, &HCF, &H53 , &H2A, &H77, &H2, &HC9, &H19, &H7F}, RegistryValueKind.Binary)
它将作为REG_BINARY
类型插入注册表。