Apache log4net� SDK Documentation - Microsoft .NET Framework 4.0

MDC.Set�Method�

Add an entry to the MDC

[Visual�Basic]
Public�Shared�Sub�Set( _
���ByVal key�As�String,�_
���ByVal value�As�String�_
)
[C#]
public�static�void�Set(
���stringkey,
���stringvalue
);

Parameters

key
The key to store the value under.
value
The value to store.

Remarks

Note���

The MDC is deprecated and has been replaced by the Properties. The current MDC implementation forwards to the ThreadContext.Properties.

Puts a context value (the value parameter) as identified with the key parameter into the current thread's context map.

If a value is already defined for the key specified then the value will be replaced. If the value is specified as null then the key value mapping will be removed.

See Also

MDC Class | log4net Namespace