Partager via


Properties.GetProperty Method

Definition

Overloads

GetProperty(String)

Searches for the property with the specified key in this property list.

GetProperty(String, String)

Searches for the property with the specified key in this property list.

GetProperty(String)

Searches for the property with the specified key in this property list.

[Android.Runtime.Register("getProperty", "(Ljava/lang/String;)Ljava/lang/String;", "GetGetProperty_Ljava_lang_String_Handler")]
public virtual string? GetProperty (string? key);
[<Android.Runtime.Register("getProperty", "(Ljava/lang/String;)Ljava/lang/String;", "GetGetProperty_Ljava_lang_String_Handler")>]
abstract member GetProperty : string -> string
override this.GetProperty : string -> string

Parameters

key
String

the property key.

Returns

the value in this property list with the specified key value.

Attributes

Remarks

Searches for the property with the specified key in this property list. If the key is not found in this property list, the default property list, and its defaults, recursively, are then checked. The method returns null if the property is not found.

Java documentation for java.util.Properties.getProperty(java.lang.String).

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

GetProperty(String, String)

Searches for the property with the specified key in this property list.

[Android.Runtime.Register("getProperty", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "GetGetProperty_Ljava_lang_String_Ljava_lang_String_Handler")]
public virtual string? GetProperty (string? key, string? defaultValue);
[<Android.Runtime.Register("getProperty", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "GetGetProperty_Ljava_lang_String_Ljava_lang_String_Handler")>]
abstract member GetProperty : string * string -> string
override this.GetProperty : string * string -> string

Parameters

key
String

the hashtable key.

defaultValue
String

a default value.

Returns

the value in this property list with the specified key value.

Attributes

Remarks

Searches for the property with the specified key in this property list. If the key is not found in this property list, the default property list, and its defaults, recursively, are then checked. The method returns the default value argument if the property is not found.

Java documentation for java.util.Properties.getProperty(java.lang.String, java.lang.String).

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