MessageFormat.SetFormatByArgumentIndex(Int32, _Format) 方法

定义

设置用于以前设置的模式字符串中使用给定参数索引的格式元素的格式。

[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

参数

argumentIndex
Int32

使用新格式的参数索引

newFormat
_Format

要使用的新格式

属性

注解

设置用于以前设置的模式字符串中使用给定参数索引的格式元素的格式。 参数索引是格式元素定义的一部分,它表示传递给arguments方法或方法返回的结果数组的数组中的format索引parse

如果参数索引用于模式字符串中的多个格式元素,则新格式将用于所有此类格式元素。 如果参数索引不用于模式字符串中的任何格式元素,则忽略新格式。

在 1.4 中添加。

Java文档java.text.MessageFormat.setFormatByArgumentIndex(int, java.text.Format)

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于