MessageFormat.SetFormatByArgumentIndex(Int32, _Format) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
设置要用于以前设置的模式字符串中使用给定参数索引的格式元素的 Format 对象。
[Android.Runtime.Register("setFormatByArgumentIndex", "(ILjava/text/Format;)V", "GetSetFormatByArgumentIndex_ILjava_text_Format_Handler", ApiSince=24)]
public virtual void SetFormatByArgumentIndex(int argumentIndex, Java.Text._Format? newFormat);
[<Android.Runtime.Register("setFormatByArgumentIndex", "(ILjava/text/Format;)V", "GetSetFormatByArgumentIndex_ILjava_text_Format_Handler", ApiSince=24)>]
abstract member SetFormatByArgumentIndex : int * Java.Text._Format -> unit
override this.SetFormatByArgumentIndex : int * Java.Text._Format -> unit
参数
- argumentIndex
- Int32
使用新格式的参数索引
- newFormat
- _Format
要使用的新格式
- 特性
注解
设置要用于以前设置的模式字符串中使用给定参数索引的格式元素的 Format 对象。 参数索引是格式元素定义的一部分,它表示传递给arguments方法或方法返回的结果数组的数组中的format索引parse。
如果参数索引用于模式字符串中的多个格式元素,则新格式将用于所有此类格式元素。 如果参数索引不用于模式字符串中的任何格式元素,则忽略新格式。
仅当独占数字用于参数名称时,才支持此方法。 否则将引发 IllegalArgumentException。
Java文档android.icu.text.MessageFormat.setFormatByArgumentIndex(int, java.text.Format)。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。