CallStackFrame Class

Defines a single item of the call stack. Each item in the call stack is referred to as a frame. This class is introduced in Windows PowerShell 2.0.


Namespace: System.Management.Automation
Assembly: System.Management.Automation (in System.Management.Automation.dll)
'Usage
Dim instance As CallStackFrame

'Declaration
Public NotInheritable Class CallStackFrame
public final class CallStackFrame
public final class CallStackFrame

For example, the following is a script and its associated call stack. Notice that this call stack has four frames.

PS D:\scripts> cat .\MyScript.ps1
function f()
{
  Get-PSCallStack
}

function g()
{
  f
}

g
PS D:\nam\scripts> .\MyScript.ps1

Command        Arguments          Location         
-------        ---------          --------         
f              {}                 MyScript.ps1: Line 3
g              {}                 MyScript.ps1: Line 8
MyScript.ps1   {}                 MyScript.ps1: Line 11
prompt         {}                 prompt


System.Object
  System.Management.Automation.CallStackFrame
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

 

Target Platforms

Windows Developer Preview, Windows Server Developer Preview

Send comments about this topic to Microsoft.
Show:
© 2014 Microsoft. All rights reserved.