0
请帮我把这行转换成C#。帮我转换这行到C#
objManagementBaseObject.SetPropertyValue("hDefKey", CType("&H" &
Hex(RegistryHive.LocalMachine), Long))
相关参考文献在C#: System.Management
谢谢。
附加信息:
代码最初是在VB中。
请帮我把这行转换成C#。帮我转换这行到C#
objManagementBaseObject.SetPropertyValue("hDefKey", CType("&H" &
Hex(RegistryHive.LocalMachine), Long))
相关参考文献在C#: System.Management
谢谢。
附加信息:
代码最初是在VB中。
它看起来像RegistryHive.LocalMachine
只是一个枚举值,在这种情况下,将其通过己烷()只是浪费时间:
objManagmentBaseObject.SetPropertyValue("hDefKey", (long)RegistryHive.LocalMachine);
objManagementBaseObject.SetPropertyValue("hDefKey", (long)RegistryHive.LocalMachine);
是C#相当于VB.NET线。
感谢您的洞察!
谢谢。在离开代码之后,我意识到VB线只是试图将它变长。 – Ishmael 2009-02-02 20:15:53