Key.setValue

void setValue(string name, uint value)

Sets the named value with the given 32-bit unsigned integer value.

Parameters

nameThe name of the value to set. If it is the empty string, sets the default value.
valueThe 32-bit unsigned value to set.

Throws

If a value corresponding to the requested name is not found,

RegistryException is thrown.

void setValue(string name, uint value, Endian endian)

Sets the named value with the given 32-bit unsigned integer value, according to the desired byte-ordering.

Parameters

nameThe name of the value to set. If it is the empty string, sets the default value.
valueThe 32-bit unsigned value to set.
endianCan be Endian.BigEndian or Endian.LittleEndian.

Throws

If a value corresponding to the requested name is not found,

RegistryException is thrown.

void setValue(string name, ulong value)

Sets the named value with the given 64-bit unsigned integer value.

Parameters

nameThe name of the value to set. If it is the empty string, sets the default value.
valueThe 64-bit unsigned value to set.

Throws

If a value corresponding to the requested name is not found,

RegistryException is thrown.

void setValue(string name, string value)

Sets the named value with the given string value.

Parameters

nameThe name of the value to set. If it is the empty string, sets the default value.
valueThe string value to set.

Throws

If a value corresponding to the requested name is not found,

RegistryException is thrown.

void setValue(string name, string value, bool asEXPAND_SZ)

Sets the named value with the given string value.

Parameters

nameThe name of the value to set. If it is the empty string, sets the default value.
valueThe string value to set.
asEXPAND_SZIf true, the value will be stored as an expandable environment string, otherwise as a normal string.

Throws

If a value corresponding to the requested name is not found,

RegistryException is thrown.

void setValue(string name, string[] value)

Sets the named value with the given multiple-strings value.

Parameters

nameThe name of the value to set. If it is the empty string, sets the default value.
valueThe multiple-strings value to set.

Throws

If a value corresponding to the requested name is not found,

RegistryException is thrown.

void setValue(string name, byte[] value)

Sets the named value with the given binary value.

Parameters

nameThe name of the value to set. If it is the empty string, sets the default value.
valueThe binary value to set.

Throws

If a value corresponding to the requested name is not found,

RegistryException is thrown.