Home Notices Documents Classes Download Others Rice
Classes  >  preference  >  Set(string,string)
preference class : Set(string,string) method

Description

Sets a value of the entry.

Syntax

preferenceInstance.Set(string prefName, string val)

Arguments

ClassNameDescription
stringprefNameA preference name.
stringvalA value to set.

Return value

None.

Sample code

1:

preference pref = new preference();

2:

pref.Set("some.preference.entry", "value");

Notes

If the entry is not exist, the new entry will be created.

If the entry is already exist and its type is different from the argument, an RtypeException will be thrown.

If the entry is locked, this method will ignored. Therefor, the value does not change.

Links for reference

None.

Copyright © Rice All rights reserved.