ValidationEventHandler 代理人

定義

代表將處理 XML 結構驗證事件的回調方法,以及 ValidationEventArgs

public delegate void ValidationEventHandler(System::Object ^ sender, ValidationEventArgs ^ e);
public delegate void ValidationEventHandler(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

事件的 來源。

在使用程式碼前,先確定寄件者的類型。 你不能假設發送者是特定類型的實例。 發送者也無法保證不會是空。 你的投擲周圍一定要用失敗處理的邏輯。

e
ValidationEventArgs

事件資料。

擴充方法

名稱 Description
GetMethodInfo(Delegate)

取得一個代表指定代理所代表方法的物件。

適用於