Class ValueReadOnlyCollection<T>
A readonly immutable generic collection of non-null items which performs equality by value.
Inheritance
System.Object
System.Collections.ObjectModel.ReadOnlyCollection<T>
ValueReadOnlyCollection<T>
Implements
System.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IReadOnlyList<T>
System.Collections.Generic.IReadOnlyCollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IList
System.Collections.ICollection
System.Collections.IEnumerable
Inherited Members
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.Generic.IList<T>.get_Item(System.Int32)
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.Generic.IList<T>.set_Item(System.Int32, T)
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.IList.get_Item(System.Int32)
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.IList.set_Item(System.Int32, System.Object)
System.Collections.ObjectModel.ReadOnlyCollection<T>.Contains(T)
System.Collections.ObjectModel.ReadOnlyCollection<T>.CopyTo(T[], System.Int32)
System.Collections.ObjectModel.ReadOnlyCollection<T>.GetEnumerator()
System.Collections.ObjectModel.ReadOnlyCollection<T>.IndexOf(T)
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.Generic.ICollection<T>.Add(T)
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.Generic.ICollection<T>.Clear()
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.Generic.ICollection<T>.Remove(T)
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.Generic.IList<T>.Insert(System.Int32, T)
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.Generic.IList<T>.RemoveAt(System.Int32)
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.ICollection.CopyTo(System.Array, System.Int32)
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.IEnumerable.GetEnumerator()
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.IList.Add(System.Object)
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.IList.Clear()
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.IList.Contains(System.Object)
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.IList.IndexOf(System.Object)
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.IList.Insert(System.Int32, System.Object)
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.IList.Remove(System.Object)
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.IList.RemoveAt(System.Int32)
System.Collections.ObjectModel.ReadOnlyCollection<T>.Count
System.Collections.ObjectModel.ReadOnlyCollection<T>.Item[System.Int32]
System.Collections.ObjectModel.ReadOnlyCollection<T>.Items
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.Generic.ICollection<T>.IsReadOnly
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.Generic.IList<T>.Item[System.Int32]
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.ICollection.IsSynchronized
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.ICollection.SyncRoot
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.IList.IsFixedSize
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.IList.IsReadOnly
System.Collections.ObjectModel.ReadOnlyCollection<T>.System.Collections.IList.Item[System.Int32]
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: MoreStructures.dll
Syntax
public class ValueReadOnlyCollection<T> : ReadOnlyCollection<T>, IList<T>, ICollection<T>, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IList, ICollection, IEnumerable
Type Parameters
Name |
Description |
T |
The type of items in the collection.
|
Constructors
|
Improve this Doc
View Source
ValueReadOnlyCollection(IEnumerable<T>)
Creates value readonly collection out of the provided enumerable, and independent from it.
Declaration
public ValueReadOnlyCollection(IEnumerable<T> enumerable)
Parameters
Type |
Name |
Description |
IEnumerable<T> |
enumerable |
The enumerable to be used to build the readonly collection.
|
Methods
|
Improve this Doc
View Source
Equals(ValueReadOnlyCollection<T>)
Equality is calculated by value, i.e. on the collections items directly.
Declaration
public virtual bool Equals(ValueReadOnlyCollection<T> other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Equals(Object)
Equality is calculated by value, i.e. on the collections items directly.
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
System.Object.Equals(System.Object)
|
Improve this Doc
View Source
GetHashCode()
The hash code is calculated by value, as an aggregate of the hash codes of its items.
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.Object.GetHashCode()
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()
Operators
|
Improve this Doc
View Source
Equality(ValueReadOnlyCollection<T>, ValueReadOnlyCollection<T>)
Compare the two provided value read-only collections for equality by value.
Declaration
public static bool operator ==(ValueReadOnlyCollection<T> left, ValueReadOnlyCollection<T> right)
Parameters
Returns
Type |
Description |
System.Boolean |
True if the two collections are equal by their items, false otherwise.
|
|
Improve this Doc
View Source
Inequality(ValueReadOnlyCollection<T>, ValueReadOnlyCollection<T>)
Compare the two provided value read-only collections for inequality by value.
Declaration
public static bool operator !=(ValueReadOnlyCollection<T> left, ValueReadOnlyCollection<T> right)
Parameters
Returns
Type |
Description |
System.Boolean |
True if the two collections are different by their items, false otherwise.
|
Implements
System.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IReadOnlyList<T>
System.Collections.Generic.IReadOnlyCollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IList
System.Collections.ICollection
System.Collections.IEnumerable
IEquatable<>
Extension Methods