EmptyDictionary Add Method | Apache log4net™ SDK Documentation

Adds an element with the provided key and value to the EmptyDictionary.

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

C#
VB
C++
F#
Copy

    public void Add(
    	Object key,
    	Object value
    )

    Public Sub Add (
    	key As Object,
    	value As Object
    )

    public:
    virtual void Add(
    	Object^ key,
    	Object^ value
    ) sealed

    abstract Add :
            key : Object *
            value : Object -> unit
    override Add :
            key : Object *
            value : Object -> unit

#### Parameters

key
  Type: System
  Object
  The Object to use as the key of the element to add.
value
  Type: System
  Object
  The Object to use as the value of the element to add.

#### Implements

IDictionary
Add(Object, Object)
Exceptions

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

Remarks

As the collection is empty no new values can be added. A InvalidOperationException is thrown if this method is called.

See Also

#### Reference

EmptyDictionary Class
log4net.Util Namespace