Constructor EquatableList
EquatableList()
Initializes a new instance of the EquatableList<T> class that is empty and has the default initial capacity.
Declaration
public EquatableList()
EquatableList(IList<T>, Boolean)
Initializes a new instance of EquatableList<T>.
If the wrap
parameter is true
, the
collection
is used as is without doing
a copy operation. Otherwise, the collection is copied
(which is the same operation as the
EquatableList(IEnumerable<T>) overload).
The internal collection
is used for
all operations except for Equals(Object), GetHashCode(),
and ToString(), which are all based on deep analysis
of this collection and any nested collections.
Declaration
public EquatableList(IList<T> collection, bool wrap)
Parameters
Type | Name | Description |
---|---|---|
IList<T> | collection | The collection that will either be wrapped or copied
depending on the value of |
System.Boolean | wrap |
|
EquatableList(IEnumerable<T>)
Initializes a new instance of the EquatableList<T> class that contains elements copied from the specified collection and has sufficient capacity to accommodate the number of elements copied.
Declaration
public EquatableList(IEnumerable<T> collection)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<T> | collection | The collection whose elements are copied to the new list. |
EquatableList(Int32)
Initializes a new instance of the EquatableList<T> class that is empty and has the specified initial capacity.
Declaration
public EquatableList(int capacity)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | capacity | The number of elements that the new list can initially store. |