MissingMemberException.Message プロパティ
アセンブリ: 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); }

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からMissingMemberException.Message プロパティを検索する場合は、下記のリンクをクリックしてください。

- MissingMemberException.Message プロパティのページへのリンク