Resources.GetQuantityString Resources.GetQuantityString Method

Definition

Overloads

GetQuantityString(Int32, Int32) GetQuantityString(Int32, Int32)

Returns the string necessary for grammatically correct pluralization of the given resource ID for the given quantity.

GetQuantityString(Int32, Int32, Object[]) GetQuantityString(Int32, Int32, Object[])

GetQuantityString(Int32, Int32) GetQuantityString(Int32, Int32)

Returns the string necessary for grammatically correct pluralization of the given resource ID for the given quantity.

[Android.Runtime.Register("getQuantityString", "(II)Ljava/lang/String;", "GetGetQuantityString_IIHandler")]
public virtual string GetQuantityString (int id, int quantity);
abstract member GetQuantityString : int * int -> string
override this.GetQuantityString : int * int -> string

Parameters

id
Int32 Int32

The desired resource identifier, as generated by the aapt tool. This integer encodes the package, type, and resource entry. The value 0 is an invalid identifier.

quantity
Int32 Int32

The number used to get the correct string for the current language's plural rules.

Returns

Exceptions

Throws NotFoundException if the given ID does not exist.

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.

GetQuantityString(Int32, Int32, Object[]) GetQuantityString(Int32, Int32, Object[])

[Android.Runtime.Register("getQuantityString", "(II[Ljava/lang/Object;)Ljava/lang/String;", "GetGetQuantityString_IIarrayLjava_lang_Object_Handler")]
public virtual string GetQuantityString (int id, int quantity, params Java.Lang.Object[] formatArgs);
abstract member GetQuantityString : int * int * Java.Lang.Object[] -> string
override this.GetQuantityString : int * int * Java.Lang.Object[] -> string

Parameters

quantity
Int32 Int32
formatArgs
Object[]

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