NDC Clear Method | Apache log4net™ SDK Documentation

Clears all the contextual information held on the current thread.

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

C#
VB
C++
F#
Copy

    public static void Clear()

    Public Shared Sub Clear

    public:
    static void Clear()

    static member Clear : unit -> unit

Remarks

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

Clears the stack of NDC data held on the current thread.

See Also

#### Reference

NDC Class
log4net Namespace