Resources.GetIdentifier(String, String, String) Resources.GetIdentifier(String, String, String) Method

Definition

Return a resource identifier for the given resource name.

[Android.Runtime.Register("getIdentifier", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I", "GetGetIdentifier_Ljava_lang_String_Ljava_lang_String_Ljava_lang_String_Handler")]
public virtual int GetIdentifier (string name, string defType, string defPackage);
abstract member GetIdentifier : string * string * string -> int
override this.GetIdentifier : string * string * string -> int

Parameters

name
String String

The name of the desired resource.

defType
String String

Optional default resource type to find, if "type/" is not included in the name. Can be null to require an explicit type.

defPackage
String String

Optional default package to find, if "package:" is not included in the name. Can be null to require an explicit package.

Returns

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