log4net SDK Reference

NDC.Depth Property

Gets the current context depth.

[Visual Basic]
Public Shared ReadOnly Property Depth As Integer
[C#]
public static int Depth {get;}

Property Value

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 method.

See Also

NDC Class | log4net Namespace | SetMaxDepth