ValidationEventHandler 委托

定义

表示将处理 XML 架构验证事件和 ValidationEventArgs 的回调方法。Represents the callback method that will handle XML schema validation events and the ValidationEventArgs.

public delegate void ValidationEventHandler(System::Object ^ sender, ValidationEventArgs ^ e);
public delegate void ValidationEventHandler(object sender, ValidationEventArgs e);
type ValidationEventHandler = delegate of obj * ValidationEventArgs -> unit
Public Delegate Sub ValidationEventHandler(sender As Object, e As ValidationEventArgs)

参数

sender
Object

事件源。The source of the event.

注意:在代码中使用发送方之前先确定其类型。Note Determine the type of a sender before using it in your code. 您不能假设发送方是某种特定类型的实例,You cannot assume that the sender is an instance of a particular type. 也不能保证发送方不为 Null。The sender is also not guaranteed to not be null. 总是要求您使用失败处理逻辑进行强制转换。Always surround your casts with failure handling logic.

e
ValidationEventArgs

事件数据。The event data.

继承
ValidationEventHandler

扩展方法

GetMethodInfo(Delegate)

获取指示指定委托表示的方法的对象。Gets an object that represents the method represented by the specified delegate.

适用于