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

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

StackTrace.GetFrames メソッド

メモ : このメソッドは、.NET Framework version 2.0新しく追加されたものです。

現在のスタック トレース内のすべてのスタック フレームコピー返します

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

<ComVisibleAttribute(False)> _
Public Overridable Function
 GetFrames As StackFrame()
Dim instance As StackTrace
Dim returnValue As StackFrame()

returnValue = instance.GetFrames
[ComVisibleAttribute(false)] 
public virtual StackFrame[] GetFrames ()
[ComVisibleAttribute(false)] 
public:
virtual array<StackFrame^>^ GetFrames ()
/** @attribute ComVisibleAttribute(false) */ 
public StackFrame[] GetFrames ()
ComVisibleAttribute(false) 
public function GetFrames () : StackFrame[]

戻り値
スタック トレース内の関数呼び出しを表す型 StackFrame の配列

解説解説
使用例使用例

StackTrace 内のフレーム列挙コード例次に示します

Dim strace As New StackTrace(1,
 True)
Dim stFrames As StackFrame() = strace.GetFrames()

Dim sf As StackFrame
For Each sf In  stFrames
   Console.WriteLine("Method: {0}", sf.GetMethod())
Next sf
StackTrace st = new StackTrace(1, true);
StackFrame [] stFrames = st.GetFrames();

foreach(StackFrame sf in stFrames )
{
   Console.WriteLine("Method: {0}", sf.GetMethod() );
}
StackTrace^ st = gcnew StackTrace( 1,true );
array<StackFrame^>^stFrames = st->GetFrames();
for ( int i; i < stFrames->Length; i++
 )
{
   StackFrame^ sf = stFrames[ i ];
   Console::WriteLine( "Method: {0}", sf->GetMethod() );

}
StackTrace st = new StackTrace(1, true);
StackFrame stFrames[] = st.GetFrames();
for (int iCtr = 0; iCtr < stFrames.get_Length();
 iCtr++) {
    StackFrame sf = (StackFrame)stFrames.get_Item(iCtr);
    Console.WriteLine("Method: {0}", sf.GetMethod());
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

StackTrace.GetFrames メソッドのお隣キーワード
検索ランキング

   

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



StackTrace.GetFrames メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS