WarningException クラス
アセンブリ: System (system.dll 内)
構文
この例外がキャッチされない場合は、ユーザーに対して警告メッセージとして表示されます。WarningException コンストラクタでは、ユーザーが詳細情報を要求した場合に表示するヘルプ ファイルやヘルプ トピックを指定できます。
メモ |
---|
このクラスに適用される HostProtectionAttribute 属性の Resources プロパティの値は、SharedState です。HostProtectionAttribute は、デスクトップ アプリケーション (一般的には、アイコンをダブルクリック、コマンドを入力、またはブラウザに URL を入力して起動するアプリケーション) には影響しません。詳細については、HostProtectionAttribute クラスのトピックまたは「SQL Server プログラミングとホスト保護属性」を参照してください。 |
警告をキャッチし、その警告メッセージを解釈する方法を次のコード例に示します。
Dim myEx As New WarningException("This is a warning") Console.WriteLine(myEx.Message) Console.WriteLine(myEx.ToString())
WarningException myEx=new WarningException("This is a warning"); Console.WriteLine(myEx.Message); Console.WriteLine(myEx.ToString());
System.Exception
System.SystemException
System.ComponentModel.WarningException
プラットフォーム
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
- WarningException クラスのページへのリンク