ModelErrorCollection.Add 方法

定义

将验证错误添加到集合。

重载

名称 说明
Add(Exception)

使用指定的异常将验证错误添加到集合。

Add(String)

使用指定的错误消息字符串将验证错误添加到集合。

Add(Exception)

使用指定的异常将验证错误添加到集合。

public:
 void Add(Exception ^ exception);
public void Add(Exception exception);
override this.Add : Exception -> unit
Public Sub Add (exception As Exception)

参数

exception
Exception

异常。

适用于

Add(String)

使用指定的错误消息字符串将验证错误添加到集合。

public:
 void Add(System::String ^ errorMessage);
public void Add(string errorMessage);
override this.Add : string -> unit
Public Sub Add (errorMessage As String)

参数

errorMessage
String

错误消息字符串。

适用于