Table of Contents

Class ExpandableList<T>

Namespace
Gym.Collections
Assembly
Gym.dll

ExpandableList is used for representing a single value that should be expanded to a expandable List<T>.

[Obsolete("Part of the legacy Dict's merging: use List<T>. Removed in 2.0 with Gym.Legacy.")]
public class ExpandableList<T> : ExpandableList, IList, ICollection, IEnumerable, IEquatable<ExpandableList>, IExpandableList

Type Parameters

T

The type of the one value, and of the list it expands to.

Inheritance
ExpandableList<T>
Implements
Inherited Members
Extension Methods

Remarks

Obsolete with the legacy Dict (DR-56) and removed in 2.0: use List<T>. Footgun: Expand() hides the base class's, so through an ExpandableList reference the base version runs and returns a list of the value's run-time type instead.

Constructors

ExpandableList(T)

Wraps one value.

public ExpandableList(T obj)

Parameters

obj T

The value; null is allowed.

Methods

Expand()

A new growable list holding the one value, typed T.

public List<T> Expand()

Returns

List<T>

A new List<T> of one item.

Exceptions

InvalidCastException

When the value is not a T (only possible through the base constructor).