ModelBindingMessageProvider.MissingKeyOrValueAccessor 属性

定义

当 的键或值 KeyValuePair<TKey,TValue> 绑定时,模型绑定系统会添加错误消息,但不能同时绑定两者。

public:
 property Func<System::String ^> ^ MissingKeyOrValueAccessor { Func<System::String ^> ^ get(); void set(Func<System::String ^> ^ value); };
public:
 virtual property Func<System::String ^> ^ MissingKeyOrValueAccessor { Func<System::String ^> ^ get(); };
public Func<string> MissingKeyOrValueAccessor { get; set; }
public virtual Func<string> MissingKeyOrValueAccessor { get; }
member this.MissingKeyOrValueAccessor : Func<string> with get, set
member this.MissingKeyOrValueAccessor : Func<string>
Public Property MissingKeyOrValueAccessor As Func(Of String)
Public Overridable ReadOnly Property MissingKeyOrValueAccessor As Func(Of String)

属性值

默认值为 String “需要值”。。

适用于