Table of Contents

Class ValueList<T>

Namespace
GuildWars2.Collections
Assembly
GW2SDK.dll

Represents a list collection with value semantics, meaning two ValueList<T> instances are considered equal if their contents are equal. Value equality is determined by the sequence and values of the items in the collection, not by reference.

public sealed class ValueList<T> : List<T>, IList<T>, ICollection<T>, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IList, ICollection, IEnumerable, IEquatable<ValueList<T>>

Type Parameters

T
Inheritance
List<T>
ValueList<T>
Implements
Inherited Members

Remarks

Adding items to the list changes its hash code. Do not use this type in dictionaries or hash sets.

Constructors

ValueList()

Initializes a new instance of the ValueList<T> class that is empty.

ValueList(IEnumerable<T>)

Initializes a new instance of the ValueList<T> class that contains elements copied from the specified collection.

ValueList(int)

Initializes a new instance of the ValueList<T> class that is empty and has the specified initial capacity.

Methods

Equals(ValueList<T>?)

Determines whether the current ValueList<T> is equal to another ValueList<T> based on value semantics.

Equals(object?)
GetHashCode()

Returns a hash code based on the values of the items in the list.

Operators

operator ==(ValueList<T>?, ValueList<T>?)

Determines whether two ValueList<T> instances are equal by value.

operator !=(ValueList<T>?, ValueList<T>?)

Determines whether two ValueList<T> instances are not equal by value.