JavaSystem.GetProperty Method

Definition

Overloads

GetProperty(String)

Gets the system property indicated by the specified key.

GetProperty(String, String)

Gets the system property indicated by the specified key.

GetProperty(String)

Gets the system property indicated by the specified key.

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

Parameters

key
String

the name of the system property.

Returns

String

the string value of the system property, or <code>null</code> if there is no property with that key.

Attributes

Remarks

Java documentation for java.lang.System.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)

Gets the system property indicated by the specified key.

[Android.Runtime.Register("getProperty", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "")]
public static string? GetProperty (string key, string? def);
[<Android.Runtime.Register("getProperty", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "")>]
static member GetProperty : string * string -> string

Parameters

key
String

the name of the system property.

def
String

a default value.

Returns

String

the string value of the system property, or the default value if there is no property with that key.

Attributes

Remarks

Java documentation for java.lang.System.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