Skip to main content

OpenTD reference 2026 R1

Class DataArrayCollection

Last update: 09.03.2026

Namespace: OpenTD.Results.Dataset
Assembly: OpenTD.Results.dll

A collection of DataArrays, with some metadata describing them.

public class DataArrayCollection : IList<DataArray>, ICollection<DataArray>, IEnumerable<DataArray>, IEnumerable

Inheritance

object ← DataArrayCollection

Implements

IList<DataArray>, ICollection<DataArray>, IEnumerable<DataArray>, IEnumerable

Inherited Members

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

Constructors

DataArrayCollection()

public DataArrayCollection()

DataArrayCollection(IEnumerable<DataArray>)

public DataArrayCollection(IEnumerable<DataArray> collection)

Parameters

collection IEnumerable<DataArray>

DataArrayCollection(StandardDataSubtypes, IEnumerable<IEnumerable<double>>, UnitsData, IDataset, ItemIdentifier)

public DataArrayCollection(StandardDataSubtypes subtype, IEnumerable<IEnumerable<double>> collection, UnitsData units, IDataset sourceDataset = null, ItemIdentifier sourceItem = null)

Parameters

subtype StandardDataSubtypes

collection IEnumerable<IEnumerable<double>>

units UnitsData

sourceDataset IDataset

sourceItem ItemIdentifier

DataArrayCollection(DataSubtype, IEnumerable<IEnumerable<double>>, UnitsData, IDataset, ItemIdentifier)

public DataArrayCollection(DataSubtype subtype, IEnumerable<IEnumerable<double>> collection, UnitsData units, IDataset sourceDataset = null, ItemIdentifier sourceItem = null)

Parameters

subtype DataSubtype

collection IEnumerable<IEnumerable<double>>

units UnitsData

sourceDataset IDataset

sourceItem ItemIdentifier

DataArrayCollection(DataArrayCollection)

public DataArrayCollection(DataArrayCollection collection)

Parameters

collection DataArrayCollection

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

DataItemCount

If all the DataArrays in the collection have the same number of items, this will equal that. Otherwise this will be -1.

public virtual int DataItemCount { get; }

Property Value

int

Dimension

If all the DataArrays in the collection have the same physical dimension, this will equal that. Otherwise this will be UnitsData.UnitsType.UNITS_NOT_SET.

public virtual UnitsData.UnitsType Dimension { get; }

Property Value

UnitsData.UnitsType

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

MaxDataItemCount

The maximum item count found in the arrays of the collection.

public virtual int MaxDataItemCount { get; }

Property Value

int

MinDataItemCount

The minimum item count found in the arrays of the collection.

public virtual int MinDataItemCount { get; }

Property Value

int

Name

public string Name { get; set; }

Property Value

string

SourceDataItemIdentifiers

The SourceDataItemIdentifiers associated with the DataArrays in this collection.

public DataItemIdentifierCollection SourceDataItemIdentifiers { get; }

Property Value

DataItemIdentifierCollection

SourceDataset

If all the DataArrays in the collection have the same SourceDataset, this will equal that. Otherwise this will be null.

public virtual IDataset SourceDataset { get; }

Property Value

IDataset

SourceItem

If all the DataArrays in the collection have the same SourceItem, this will equal that. Otherwise this will be null.

public virtual ItemIdentifier SourceItem { get; }

Property Value

ItemIdentifier

SourceItemIdentifiers

The SourceItemIdentifiers associated with the DataArrays in this collection.

public ItemIdentifierCollection SourceItemIdentifiers { get; }

Property Value

ItemIdentifierCollection

SourceItemSubmodel

If all the DataArrays in the collection have the same SourceItem submodel, this will equal that. Otherwise this will be null.

public virtual string SourceItemSubmodel { get; }

Property Value

string

Subtype

If all the DataArrays in the collection have the same data subtype, this will equal that. Otherwise this will be null.

public virtual DataSubtype Subtype { get; }

Property Value

DataSubtype

this[int]

Gets or sets the element at the specified index.

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

Property Value

DataArray

Exceptions

ArgumentOutOfRangeException

index is not a valid index in the .

NotSupportedException

The property is set and the is read-only.

Methods

Add(DataArray)

Adds an item to the .

public void Add(DataArray x)

Parameters

x DataArray

Exceptions

NotSupportedException

The is read-only.

AddRange(IEnumerable<DataArray>)

public void AddRange(IEnumerable<DataArray> collection)

Parameters

collection IEnumerable<DataArray>

Clear()

Removes all items from the .

public void Clear()

Exceptions

NotSupportedException

The is read-only.

Contains(DataArray)

Determines whether the contains a specific value.

public bool Contains(DataArray item)

Parameters

item DataArray

The object to locate in the .

Returns

bool

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

CopyTo(DataArray[], int)

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

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

Parameters

array DataArray[]

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.

Filter(DataItemIdentifierCollection)

public DataArrayCollection Filter(DataItemIdentifierCollection dataItems)

Parameters

dataItems DataItemIdentifierCollection

Returns

DataArrayCollection

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<DataArray> GetEnumerator()

Returns

IEnumerator<DataArray>

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

GetTranspose()

public virtual DataArrayCollection GetTranspose()

Returns

DataArrayCollection

GetValues()

public virtual List<List<double>> GetValues()

Returns

List<List<double>>

GetValues(UnitsData)

public virtual List<List<double>> GetValues(UnitsData units)

Parameters

units UnitsData

Returns

List<List<double>>

IndexOf(DataArray)

Determines the index of a specific item in the .

public int IndexOf(DataArray item)

Parameters

item DataArray

The object to locate in the .

Returns

int

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

Insert(int, DataArray)

Inserts an item to the at the specified index.

public void Insert(int index, DataArray item)

Parameters

index int

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

item DataArray

The object to insert into the .

Exceptions

ArgumentOutOfRangeException

index is not a valid index in the .

NotSupportedException

The is read-only.

InsertRange(int, IEnumerable<DataArray>)

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

Parameters

index int

collection IEnumerable<DataArray>

Remove(DataArray)

Removes the first occurrence of a specific object from the .

public bool Remove(DataArray x)

Parameters

x DataArray

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

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

See Also

IAutoName

Connect with Ansys