EmptyDictionary Item Property | Apache log4net™ SDK Documentation

Gets or sets the element with the specified key.

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

C#
VB
C++
F#
Copy

    public Object this[
    	Object key
    ] { get; set; }

    Public Default Property Item (
    	key As Object
    ) As Object
    	Get
    	Set

    public:
    virtual property Object^ default[Object^ key] {
    	Object^ get (Object^ key) sealed;
    	void set (Object^ key, Object^ value) sealed;
    }

    abstract Item : Object with get, set
    override Item : Object with get, set

#### Parameters

key
  Type: System
  Object
  The key of the element to get or set.

#### Property Value

Type: Object
null

#### Implements

IDictionary
Item
Object
Exceptions

Exception | Condition
--- | ---
InvalidOperationException | This dictionary is always empty and cannot be modified.

Remarks

As the collection is empty no values can be looked up or stored. If the index getter is called then null is returned. A InvalidOperationException is thrown if the setter is called.

See Also

#### Reference

EmptyDictionary Class
log4net.Util Namespace