log4net SDK Reference

MDC.Get Method 

Gets the context value identified by the key parameter.

[Visual Basic]
Public Shared Function Get( _
   ByVal key As String _
) As String
[C#]
public static string Get(
   string key
);

Parameters

key
The key to lookup in the MDC.

Return Value

The string value held for the key, or a null reference if no corresponding value is found.

Remarks

Note   

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

If the key parameter does not look up to a previously defined context then null will be returned.

See Also

MDC Class | log4net Namespace