EmptyCollection Class | Apache log4net™ SDK Documentation

An always empty ICollection.
Inheritance Hierarchy

System
Object
log4net.Util
EmptyCollection

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

C#
VB
C++
F#
Copy

    [SerializableAttribute]
    public sealed class EmptyCollection : ICollection,
    	IEnumerable

    <SerializableAttribute>
    Public NotInheritable Class EmptyCollection
    	Implements ICollection, IEnumerable

    [SerializableAttribute]
    public ref class EmptyCollection sealed : ICollection,
    	IEnumerable

    [<SealedAttribute>]
    [<SerializableAttribute>]
    type EmptyCollection =
        class
            interface ICollection
            interface IEnumerable
        end

The EmptyCollection type exposes the following members.

Properties

| Name | Description
--- | --- | ---
| Count | Gets the number of elements contained in the ICollection.
| Instance | Gets the singleton instance of the empty collection.
| IsSynchronized | Gets a value indicating if access to the ICollection is synchronized (thread-safe).
| SyncRoot | Gets an object that can be used to synchronize access to the ICollection.

Top
Methods

| Name | Description
--- | --- | ---
| CopyTo | Copies the elements of the ICollection to an Array, starting at a particular Array index.
| Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
| GetEnumerator | Returns an enumerator that can iterate through a collection.
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
| GetType | Gets the Type of the current instance. (Inherited from Object.)
| ToString | Returns a String that represents the current Object. (Inherited from Object.)

Top
Remarks

A singleton implementation of the ICollection interface that always represents an empty collection.

See Also

#### Reference

log4net.Util Namespace