NDC CloneStack Method | Apache log4net™ SDK Documentation

Creates a clone of the stack of context information.

Namespace: log4net
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

C#
VB
C++
F#
Copy

    public static Stack CloneStack()

    Public Shared Function CloneStack As Stack

    public:
    static Stack^ CloneStack()

    static member CloneStack : unit -> Stack

#### Return Value

Type: Stack
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(Stack) method to allow child threads to inherit the context of their parent thread.

See Also

#### Reference

NDC Class
log4net Namespace