MessageFormat.SetFormatByArgumentIndex(Int32, _Format) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
設定先前設定的模式字串中使用該參數索引的格式元素的格式。
[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)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。