Skip to main content

OpenTD reference 2026 R1

Class Series2dCollection

Last update: 09.03.2026

Namespace: OpenTD.Results.Plot
Assembly: OpenTD.Results.dll

A collection of 2d series and metadata describing them.

public class Series2dCollection : IList<Series2d>, ICollection<Series2d>, IEnumerable<Series2d>, IEnumerable

Inheritance

object ← Series2dCollection

Implements

IList<Series2d>, ICollection<Series2d>, IEnumerable<Series2d>, IEnumerable

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors

Series2dCollection()

public Series2dCollection()

Properties

AutoCommenter

protected AutoCommenter AutoCommenter { get; set; }

Property Value

AutoCommenter

AutoNamer

protected AutoNamer AutoNamer { get; set; }

Property Value

AutoNamer

Comment

public string Comment { get; set; }

Property Value

string

Count

Gets the number of elements contained in the .

public int Count { get; }

Property Value

int

InternalSuggestedComment

public string InternalSuggestedComment { get; set; }

Property Value

string

InternalSuggestedName

public string InternalSuggestedName { get; set; }

Property Value

string

IsReadOnly

Gets a value indicating whether the is read-only.

public bool IsReadOnly { get; }

Property Value

bool

Name

public string Name { get; set; }

Property Value

string

this[int]

Gets or sets the element at the specified index.

public Series2d this[int index] { get; set; }

Property Value

Series2d

Exceptions

ArgumentOutOfRangeException

index is not a valid index in the .

NotSupportedException

The property is set and the is read-only.

Methods

Add(Series2d)

Adds an item to the .

public void Add(Series2d item)

Parameters

item Series2d

The object to add to the .

Exceptions

NotSupportedException

The is read-only.

AddRange(IEnumerable<Series2d>)

public void AddRange(IEnumerable<Series2d> collection)

Parameters

collection IEnumerable<Series2d>

Clear()

Removes all items from the .

public void Clear()

Exceptions

NotSupportedException

The is read-only.

Contains(Series2d)

Determines whether the contains a specific value.

public bool Contains(Series2d item)

Parameters

item Series2d

The object to locate in the .

Returns

bool

true if item is found in the ; otherwise, false.

CopyTo(Series2d[], int)

Copies the elements of the to an , starting at a particular index.

public void CopyTo(Series2d[] array, int arrayIndex)

Parameters

array Series2d[]

The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.

arrayIndex int

The zero-based index in array at which copying begins.

Exceptions

ArgumentNullException

array is null.

ArgumentOutOfRangeException

arrayIndex is less than 0.

ArgumentException

The number of elements in the source is greater than the available space from arrayIndex to the end of the destination array.

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<Series2d> GetEnumerator()

Returns

IEnumerator<Series2d>

An enumerator that can be used to iterate through the collection.

GetSelfSuggestedComment()

protected virtual string GetSelfSuggestedComment()

Returns

string

GetSelfSuggestedName()

protected virtual string GetSelfSuggestedName()

Returns

string

IndexOf(Series2d)

Determines the index of a specific item in the .

public int IndexOf(Series2d item)

Parameters

item Series2d

The object to locate in the .

Returns

int

The index of item if found in the list; otherwise, -1.

Insert(int, Series2d)

Inserts an item to the at the specified index.

public void Insert(int index, Series2d item)

Parameters

index int

The zero-based index at which item should be inserted.

item Series2d

The object to insert into the .

Exceptions

ArgumentOutOfRangeException

index is not a valid index in the .

NotSupportedException

The is read-only.

InsertRange(int, IEnumerable<Series2d>)

public void InsertRange(int index, IEnumerable<Series2d> collection)

Parameters

index int

collection IEnumerable<Series2d>

Remove(Series2d)

Removes the first occurrence of a specific object from the .

public bool Remove(Series2d item)

Parameters

item Series2d

The object to remove from the .

Returns

bool

true if item was successfully removed from the ; otherwise, false. This method also returns false if item is not found in the original .

Exceptions

NotSupportedException

The is read-only.

RemoveAt(int)

Removes the item at the specified index.

public void RemoveAt(int index)

Parameters

index int

The zero-based index of the item to remove.

Exceptions

ArgumentOutOfRangeException

index is not a valid index in the .

NotSupportedException

The is read-only.

RemoveRange(int, int)

public void RemoveRange(int index, int count)

Parameters

index int

count int

See Also

Plot2d, Series2d, IAutoName

Connect with Ansys