Preferences.PutFloat(String, Single) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Associates a string representing the specified float value with the specified key in this preference node.
[Android.Runtime.Register("putFloat", "(Ljava/lang/String;F)V", "GetPutFloat_Ljava_lang_String_FHandler")]
public abstract void PutFloat (string? key, float value);
[<Android.Runtime.Register("putFloat", "(Ljava/lang/String;F)V", "GetPutFloat_Ljava_lang_String_FHandler")>]
abstract member PutFloat : string * single -> unit
Parameters
- key
- String
key with which the string form of value is to be associated.
- value
- Single
value whose string form is to be associated with key.
- Attributes
Exceptions
if the given key is null
.
if the given key's length is bigger than MAX_KEY_LENGTH
.
if this node has been removed.
Remarks
Associates a string representing the specified float value with the specified key in this preference node. The associated string is the one that would be returned if the float value were passed to Float#toString(float)
. This method is intended for use in conjunction with #getFloat
.
Java documentation for java.util.prefs.Preferences.putFloat(java.lang.String, float)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.