log4net SDK Reference |

# NDC.CloneStack Method

Creates a clone of the stack of context information.

[Visual Basic]
Public Shared Function CloneStack() As Stack
[C#]
public static Stack CloneStack();

#### Return Value

A clone of the context info for this thread.

#### Remarks

> Note

> The NDC is deprecated and has been replaced by the Stacks. The current NDC implementation forwards to the `ThreadContext.Stacks["NDC"]`.

The results of this method can be passed to the Inherit method to allow child threads to inherit the context of their parent thread.

#### See Also

NDC Class | log4net Namespace