Class Collection<T>
- Namespace
- Dynamicweb.Content.Items
- Assembly
- Dynamicweb.dll
Represents a collection of elements.
public class Collection<T> : Collection<T>, IList<T>, ICollection<T>, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IList, ICollection, IEnumerable
Type Parameters
T
Element type.
- Inheritance
-
Collection<T>Collection<T>
- Implements
-
IList<T>ICollection<T>IEnumerable<T>
- Derived
- Inherited Members
- Extension Methods
Constructors
Collection()
Initializes a new instance of an object.
Collection(IEnumerable<T>)
Initializes a new instance of an object.
Parameters
items
IEnumerable<T>Elements to be copied to this collection.
Properties
Data
Gets the underlying data storage.
Property Value
- List<T>
Methods
AddRange(IEnumerable<T>)
Adds a given elements to the end of the collection.
Parameters
items
IEnumerable<T>Elements to add.
Find(Func<T, bool>)
Returns a first element from the collection that satisfies the condition.
Parameters
Returns
- T
A first element from the collection that satisfies the condition.
FindAll(Func<T, bool>)
Returns all elements from the collection that satisfies the condition.
Parameters
Returns
- IEnumerable<T>
All elements from the collection that satisfies the condition.
FindIndex(Func<T, bool>)
Returns an index of a first element from the collection that satisfies the condition.
Parameters
Returns
- int
An index of a first element from the collection that satisfies the condition.
RemoveRange(IEnumerable<T>)
Removes a given elements from the collection.
Parameters
items
IEnumerable<T>Elements to remove.
Sort(IComparer<T>)
Sorts elements according to the given comparer.
Parameters
comparer
IComparer<T>Comparer.
Sort(Comparison<T>)
Sorts elements according to the given comparison.
Parameters
comparison
Comparison<T>Comparison.