BindingManagerDataErrorEventArgs クラス

定義

DataError イベントのデータを提供します。

public ref class BindingManagerDataErrorEventArgs : EventArgs
public class BindingManagerDataErrorEventArgs : EventArgs
type BindingManagerDataErrorEventArgs = class
    inherit EventArgs
Public Class BindingManagerDataErrorEventArgs
Inherits EventArgs
継承
BindingManagerDataErrorEventArgs

次のコード例では、この型の使用方法を示します。 この例では、イベント ハンドラーによってイベントの発生が DataError 報告されます。 このレポートは、イベントがいつ発生するかを学習するのに役立ち、デバッグに役立ちます。 複数のイベントまたは頻繁に発生するイベントに関するレポートを作成するには、メッセージを複数行TextBoxConsole.WriteLine置き換えるかShow追加することを検討してください。

コード例を実行するには、継承元の型 BindingManagerBaseのインスタンスを含むプロジェクトに貼り付けます (例: PropertyManager CurrencyManager. 次に、インスタンス BindingManagerBase1 に名前を付け、イベント ハンドラーがイベントに DataError 関連付けられていることを確認します。

private void BindingManagerBase1_DataError(Object sender, BindingManagerDataErrorEventArgs e) {
    System.Text.StringBuilder messageBoxCS = new System.Text.StringBuilder();
    messageBoxCS.AppendFormat("{0} = {1}", "Exception", e.Exception);
    messageBoxCS.AppendLine();
    MessageBox.Show(messageBoxCS.ToString(), "DataError Event");
}
Private Sub BindingManagerBase1_DataError(sender as Object, e as BindingManagerDataErrorEventArgs) _ 
     Handles BindingManagerBase1.DataError

    Dim messageBoxVB as New System.Text.StringBuilder()
    messageBoxVB.AppendFormat("{0} = {1}", "Exception", e.Exception)
    messageBoxVB.AppendLine()
    MessageBox.Show(messageBoxVB.ToString(),"DataError Event")

End Sub

注釈

バインディング BindingManagerDataErrorEventArgs プロセスでキャッチされたサービスを提供 Exception します。

コンストラクター

BindingManagerDataErrorEventArgs(Exception)

BindingManagerDataErrorEventArgs クラスの新しいインスタンスを初期化します。

プロパティ

Exception

Exception イベント発生の原因となった、バインディング処理でキャッチされた DataError を取得します。

メソッド

Equals(Object)

指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。

(継承元 Object)
GetHashCode()

既定のハッシュ関数として機能します。

(継承元 Object)
GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
MemberwiseClone()

現在の Object の簡易コピーを作成します。

(継承元 Object)
ToString()

現在のオブジェクトを表す文字列を返します。

(継承元 Object)

適用対象