MessageFormat.SetFormatsByArgumentIndex(_Format[]) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
設定傳遞給 format 方法或從 parse 方法回傳的值所使用的格式。
[Android.Runtime.Register("setFormatsByArgumentIndex", "([Ljava/text/Format;)V", "GetSetFormatsByArgumentIndex_arrayLjava_text_Format_Handler")]
public virtual void SetFormatsByArgumentIndex(Java.Text._Format[]? newFormats);
[<Android.Runtime.Register("setFormatsByArgumentIndex", "([Ljava/text/Format;)V", "GetSetFormatsByArgumentIndex_arrayLjava_text_Format_Handler")>]
abstract member SetFormatsByArgumentIndex : Java.Text._Format[] -> unit
override this.SetFormatsByArgumentIndex : Java.Text._Format[] -> unit
參數
- newFormats
- _Format[]
新格式的應用
- 屬性
備註
設定傳遞給 format 方法或從 parse 方法回傳的值所使用的格式。 元素的 newFormats 索引對應於先前設定的模式串中使用的參數索引。 因此,格式 newFormats 的順序對應於陣列中 arguments 傳遞給 format 方法的元素順序或方法回傳 parse 的結果陣列的順序。
如果一個參數索引用於模式串中的多個格式元素,則所有此類元素都會使用相應的新格式。 若模式字串中未使用參數索引,則忽略對應的新格式。 若提供格式少於所需,則僅替換參數索引小於newFormats.length
在 1.4 版本加入。
的 java.text.MessageFormat.setFormatsByArgumentIndex(java.text.Format[])Java 檔。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。