NDC Depth Property | Apache log4net™ SDK Documentation

Gets the current context depth.

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

C#
VB
C++
F#
Copy

    public static int Depth { get; }

    Public Shared ReadOnly Property Depth As Integer
    	Get

    public:
    static property int Depth {
    	int get ();
    }

    static member Depth : int with get

#### Property Value

Type: Int32
The current context depth.
Remarks

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

The number of context values pushed onto the context stack.

Used to record the current depth of the context. This can then be restored using the SetMaxDepth(Int32) method.

See Also

#### Reference

NDC Class
log4net Namespace
NDC
SetMaxDepth(Int32)