Specifies the data types to use when storing values in the registry, or identifies the data type of a value in the registry.
The Microsoft.Win32.RegistryValueKind enumeration defines the set of supported registry data types and the value that is used for unsupported types (RegistryValueKind.Unknown). Starting in the net_v40_long, you can specify not to use a data type with the RegistryValueKind.None value.
Use the RegistryKey.GetValueKind(string) method to determine the data type of a registry key value before retrieving the value. When you set a registry key value, use the RegistryKey.SetValue(string, object, RegistryValueKind) method to specify the registry data type explicitly.
Member Name | Description |
---|---|
Binary |
Binary data in any form. This value is equivalent to the Win32 API registry data type REG_BINARY. |
DWord |
A 32-bit binary number. This value is equivalent to the Win32 API registry data type REG_DWORD. |
ExpandString |
A null-terminated string that contains unexpanded references to environment variables, such as %PATH%, that are expanded when the value is retrieved. This value is equivalent to the Win32 API registry data type REG_EXPAND_SZ. |
MultiString |
An array of null-terminated strings, terminated by two null characters. This value is equivalent to the Win32 API registry data type REG_MULTI_SZ. |
None |
No data type. |
QWord |
A 64-bit binary number. This value is equivalent to the Win32 API registry data type REG_QWORD. |
String |
A null-terminated string. This value is equivalent to the Win32 API registry data type REG_SZ. |
Unknown |
An unsupported registry data type. For example, the Microsoft Win32 API registry data type REG_RESOURCE_LIST is unsupported. Use this value to specify that the RegistryKey.SetValue(string, object) method should determine the appropriate registry data type when storing a name/value pair. |