StackFrame.GetMethod メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > StackFrame.GetMethod メソッドの意味・解説 

StackFrame.GetMethod メソッド

フレームを実行しているメソッドを取得します。

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

Public Overridable Function
 GetMethod As MethodBase
Dim instance As StackFrame
Dim returnValue As MethodBase

returnValue = instance.GetMethod
public virtual MethodBase GetMethod ()
public:
virtual MethodBase^ GetMethod ()
public MethodBase GetMethod ()
public function GetMethod () : MethodBase

戻り値
フレームを実行しているメソッド。

使用例使用例

GetMethod メソッドを使用する方法を次のコード例に示します。

Dim frame As New StackFrame(1,
 True)
Dim strace As New StackTrace(frame)
            

EventLog.WriteEntry(frame.GetMethod().Name, _
                    strace.ToString(), _
                    EventLogEntryType.Warning)
StackFrame fr = new StackFrame(1,true);
StackTrace st = new StackTrace(fr);
EventLog.WriteEntry(fr.GetMethod().Name,
                    st.ToString(),
                    EventLogEntryType.Warning);
StackFrame^ fr = gcnew StackFrame( 1,true );
StackTrace^ st = gcnew StackTrace( fr );
EventLog::WriteEntry( fr->GetMethod()->Name, st->ToString(), EventLogEntryType::Warning
 );
StackFrame fr = new StackFrame(1, true);
StackTrace st = new StackTrace(fr);
EventLog.WriteEntry(fr.GetMethod().get_Name(), st.ToString(),
    EventLogEntryType.Warning);
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

StackFrame.GetMethod メソッドのお隣キーワード

   

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



StackFrame.GetMethod メソッドのページの著作権

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

©2026 GRAS Group, Inc.RSS