ErrorEventArgs コンストラクタとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ErrorEventArgs コンストラクタの意味・解説 

ErrorEventArgs コンストラクタ

ErrorEventArgs クラス新しインスタンス初期化します。

名前空間: System.IO
アセンブリ: System (system.dll 内)
構文構文

使用例使用例

ErrorEventArgs新しインスタンス作成し、そのインスタンスException使用して初期化する例を次に示します次に GetException を呼び出して Exception取得しエラー メッセージ表示します。このコード関連付けられたフォームはありません。

Public Shared Sub Main()
    'Creates an exception with an error message.
    Dim myException As New
 Exception("This is an exception test")
       
    'Creates an ErrorEventArgs with the exception.
    Dim myErrorEventArgs As New
 ErrorEventArgs(myException)
       
    'Extracts the exception from the ErrorEventArgs and display it.
    Dim myReturnedException As Exception =
 myErrorEventArgs.GetException()
    MessageBox.Show("The returned exception is: "
 _
       + myReturnedException.Message)
End Sub
public static void Main(string[]
 args) {
   //Creates an exception with an error message.
   Exception myException= new Exception("This is an exception
 test");

   //Creates an ErrorEventArgs with the exception.
   ErrorEventArgs myErrorEventArgs = new ErrorEventArgs(myException);

   //Extracts the exception from the ErrorEventArgs and display it.
   Exception myReturnedException = myErrorEventArgs.GetException();
   MessageBox.Show("The returned exception is: " + myReturnedException.Message);
}
int main()
{
   
   //Creates an exception with an error message.
   Exception^ myException = gcnew Exception( "This is an exception test"
 );
   
   //Creates an ErrorEventArgs with the exception.
   ErrorEventArgs^ myErrorEventArgs = gcnew ErrorEventArgs( myException );
   
   //Extracts the exception from the ErrorEventArgs and display it.
   Exception^ myReturnedException = myErrorEventArgs->GetException();
   MessageBox::Show( String::Concat( "The returned exception is: ", myReturnedException->Message
 ) );
}

public static void main(String[]
 args)
{
    //Creates an exception with an error message.
    System.Exception myException = 
        new System.Exception("This is an exception test");

    //Creates an ErrorEventArgs with the exception.
    ErrorEventArgs myErrorEventArgs = new ErrorEventArgs(myException);

    //Extracts the exception from the ErrorEventArgs and display it.
    System.Exception myReturnedException = myErrorEventArgs.GetException();

    MessageBox.Show("The returned exception is: " 
        + myReturnedException.get_Message());
} //main
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「ErrorEventArgs コンストラクタ」の関連用語

ErrorEventArgs コンストラクタのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ErrorEventArgs コンストラクタのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS