Condividi tramite


MessageFormat.SetFormatByArgumentIndex(Int32, _Format) Method

Definition

Sets the format to use for the format elements within the previously set pattern string that use the given argument index.

[Android.Runtime.Register("setFormatByArgumentIndex", "(ILjava/text/Format;)V", "GetSetFormatByArgumentIndex_ILjava_text_Format_Handler")]
public virtual void SetFormatByArgumentIndex (int argumentIndex, Java.Text._Format? newFormat);
[<Android.Runtime.Register("setFormatByArgumentIndex", "(ILjava/text/Format;)V", "GetSetFormatByArgumentIndex_ILjava_text_Format_Handler")>]
abstract member SetFormatByArgumentIndex : int * Java.Text._Format -> unit
override this.SetFormatByArgumentIndex : int * Java.Text._Format -> unit

Parameters

argumentIndex
Int32

the argument index for which to use the new format

newFormat
_Format

the new format to use

Attributes

Remarks

Sets the format to use for the format elements within the previously set pattern string that use the given argument index. The argument index is part of the format element definition and represents an index into the arguments array passed to the format methods or the result array returned by the parse methods.

If the argument index is used for more than one format element in the pattern string, then the new format is used for all such format elements. If the argument index is not used for any format element in the pattern string, then the new format is ignored.

Added in 1.4.

Java documentation for java.text.MessageFormat.setFormatByArgumentIndex(int, java.text.Format).

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