Preferences.GetFloat(String, Single) Method

Definition

Gets the float value mapped to the given key or its default value if no value is mapped, if the backing store is unavailable, or if the value is an invalid string.

[Android.Runtime.Register("getFloat", "(Ljava/lang/String;F)F", "GetGetFloat_Ljava_lang_String_FHandler")]
public abstract float GetFloat (string key, float def);
abstract member GetFloat : string * single -> single

Parameters

key
String

the preference key.

def
Single

Returns

Single
Attributes

Exceptions

if this node has been removed.

if the parameter key is null.

Remarks

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.

Applies to