MessageFormat.SetFormatsByArgumentName 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
[icu] 设置要用于传入 format 方法或从 parse 方法返回的值的 Format 对象。
[Android.Runtime.Register("setFormatsByArgumentName", "(Ljava/util/Map;)V", "GetSetFormatsByArgumentName_Ljava_util_Map_Handler", ApiSince=24)]
public virtual void SetFormatsByArgumentName(System.Collections.Generic.IDictionary<string,Java.Text._Format>? newFormats);
[<Android.Runtime.Register("setFormatsByArgumentName", "(Ljava/util/Map;)V", "GetSetFormatsByArgumentName_Ljava_util_Map_Handler", ApiSince=24)>]
abstract member SetFormatsByArgumentName : System.Collections.Generic.IDictionary<string, Java.Text._Format> -> unit
override this.SetFormatsByArgumentName : System.Collections.Generic.IDictionary<string, Java.Text._Format> -> unit
参数
- newFormats
- IDictionary<String,_Format>
从字符串到格式的映射,为命名参数提供新格式。
- 特性
注解
[icu] 设置要用于传入 format 方法或从 parse 方法返回的值的 Format 对象。
newFormats键是前面设置的模式字符串中的参数名称,值是格式。
仅考虑模式字符串中的参数名称。 忽略不对应于参数名称的额外键 newFormats 。 同样,如果 newFormats 中没有参数名称的格式,则该参数的格式化程序保持不变。
这可能针对不使用命名参数的格式调用。 在这种情况下,将查询表示参数索引的键字符串,例如“0”、“1”、“2”等。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。