# CallStack class

Namespace: [Grasshopper2.Doc](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.doc.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public sealed class CallStack
```

Represents the stack of objects that form the invocation sequence to a specific [IDocumentObject](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.idocumentobject.md). This is typically used to figure out whether an invocation sequence is in fact a loop (i.e. cyclical), but it may be useful for other purposes too.

## Properties

- [All](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.callstack/all.md): Iterate over all objects in the stack.
- [Empty](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.callstack/empty.md): (static) Gets an empty call stack.
- [Head](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.callstack/head.md): Gets the most recent object in the stack. This may be null.

## Methods

- [Contains](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.callstack/contains.md): (2 overloads) Test whether an object with the given instance ID is present in the invocation stack.
- [Pop](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.callstack/pop.md): Pop the head off this stack.

## Operators

- [operator +](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.callstack/op-addition.md): (static) Push a new object to the head of this stack.
