Java.Text.NumberFormat.Format Method
Formats a number into a supplied buffer.

Syntax

[Android.Runtime.Register("format", "(Ljava/lang/Object;Ljava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer;", "GetFormat_Ljava_lang_Object_Ljava_lang_StringBuffer_Ljava_text_FieldPosition_Handler")]
public override Java.Lang.StringBuffer Format (Java.Lang.Object object, Java.Lang.StringBuffer buffer, FieldPosition field)

Parameters

object
the object to format, must be a Number.
buffer
the target string buffer to append the formatted number to.
field
on input: an optional alignment field; on output: the offsets of the alignment field in the formatted text.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Lang.IllegalArgumentExceptionif object is not an instance of Number.

Remarks

Formats a number into a supplied buffer.

The number must be a subclass of Number. Instances of Byte, Short, Integer, and Long have Number.longValue invoked, as do instances of BigInteger where BigInteger.bitLength returns less than 64. All other values have Number.doubleValue invoked instead.

If the field member of field contains a value specifying a format field, then its beginIndex and endIndex members will be updated with the position of the first occurrence of this field in the formatted text.

[Android Documentation]

Requirements

Namespace: Java.Text
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1