MissingMemberException.Message プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > MissingMemberException.Message プロパティの意味・解説 

MissingMemberException.Message プロパティ

存在しないメンバクラス名メンバ名、シグネチャを示す文字列を取得します

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

解説解説
使用例使用例

Message プロパティの例を次に示します。このコード例は、MissingMemberException クラストピック取り上げているコード例一部分です。

try 
{
    // Attempt to access a static AnotherField field defined in the
 App class.
    // However, because the App class does not define this field, 
    // a MissingFieldException is thrown.
    typeof(App).InvokeMember("AnotherField", BindingFlags.Static | 
        BindingFlags.GetField, null, null,
 null);
}        
catch (MissingMemberException e) 
{
 // Notice that this code is catching MissingMemberException which is
 the  
 // base class of MissingMethodException and MissingFieldException.
 // Show the user that the AnotherField field cannot be accessed.
 Console.WriteLine("Unable to access the AnotherField field: {0}", e.Message);
}
try 
{
    // Attempt to access a static AnotherField field defined in the
 App class.
    // However, because the App class does not define this field, 
    // a MissingFieldException is thrown.
    App::typeid->InvokeMember("AnotherField", BindingFlags::Static |
 
        BindingFlags::GetField, nullptr, nullptr, nullptr);
}        
catch (MissingMemberException^ ex) 
{
    // Notice that this code is catching MissingMemberException which is
 the  
    // base class of MissingMethodException and MissingFieldException.
    // Show the user that the AnotherField field cannot be accessed.
    Console::WriteLine("Unable to access the AnotherField field: {0}",
 
        ex->Message);
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
MissingMemberException クラス
MissingMemberException メンバ
System 名前空間
Exception クラス
MissingFieldException クラス
MissingMethodException
その他の技術情報
例外の処理とスロー



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

辞書ショートカット

すべての辞書の索引

「MissingMemberException.Message プロパティ」の関連用語

MissingMemberException.Message プロパティのお隣キーワード
検索ランキング

   

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



MissingMemberException.Message プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS