> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Class DataItemIdentifierCollection

Namespace: [OpenTD.Results.Dataset](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Results.Dataset)\
Assembly: OpenTD.Results.dll

Collection of DataItemIdentifiers

```csharp theme={null}
public class DataItemIdentifierCollection : IList<DataItemIdentifier>, ICollection<DataItemIdentifier>, IEnumerable<DataItemIdentifier>, IEnumerable
```

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[DataItemIdentifierCollection](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Results.Dataset.DataItemIdentifierCollection.md)

## Implements

[IList\<DataItemIdentifier>](https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1),
[ICollection\<DataItemIdentifier>](https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1),
[IEnumerable\<DataItemIdentifier>](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1),
[IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.ienumerable)

## Inherited Members

[object.Equals(object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)),
[object.Equals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)),
[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode),
[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype),
[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone),
[object.ReferenceEquals(object?, object?)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals),
[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Constructors

### DataItemIdentifierCollection(IEnumerable\<DataItemIdentifier>)

```csharp theme={null}
public DataItemIdentifierCollection(IEnumerable<DataItemIdentifier> collection)
```

#### Parameters

`collection` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)\<[DataItemIdentifier](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Results.Dataset.DataItemIdentifier.md)>

### DataItemIdentifierCollection()

```csharp theme={null}
public DataItemIdentifierCollection()
```

### DataItemIdentifierCollection(ItemIdentifierCollection, List\<DataSubtype>, bool)

```csharp theme={null}
public DataItemIdentifierCollection(ItemIdentifierCollection items, List<DataSubtype> subtypes, bool createAllCombinations = true)
```

#### Parameters

`items` [ItemIdentifierCollection](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Results.Dataset.ItemIdentifierCollection.md)

`subtypes` [List](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)\<[DataSubtype](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Results.Dataset.DataSubtype.md)>

`createAllCombinations` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### DataItemIdentifierCollection(ItemIdentifierCollection, DataSubtype)

```csharp theme={null}
public DataItemIdentifierCollection(ItemIdentifierCollection items, DataSubtype subtype)
```

#### Parameters

`items` [ItemIdentifierCollection](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Results.Dataset.ItemIdentifierCollection.md)

`subtype` [DataSubtype](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Results.Dataset.DataSubtype.md)

### DataItemIdentifierCollection(IEnumerable\<string>)

```csharp theme={null}
public DataItemIdentifierCollection(IEnumerable<string> dataItemNames)
```

#### Parameters

`dataItemNames` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)\<[string](https://learn.microsoft.com/dotnet/api/system.string)>

### DataItemIdentifierCollection(params string\[])

```csharp theme={null}
public DataItemIdentifierCollection(params string[] sindaNames)
```

#### Parameters

`sindaNames` [string](https://learn.microsoft.com/dotnet/api/system.string)\[]

## Properties

### AutoNamer

```csharp theme={null}
protected AutoNamer AutoNamer { get; set; }
```

#### Property Value

AutoNamer

### Count

Gets the number of elements contained in the ICollection\`1.

```csharp theme={null}
public int Count { get; }
```

#### Property Value

[int](https://learn.microsoft.com/dotnet/api/system.int32)

### InternalSuggestedName

```csharp theme={null}
public string InternalSuggestedName { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### IsReadOnly

Gets a value indicating whether the ICollection\`1 is read-only.

```csharp theme={null}
public bool IsReadOnly { get; }
```

#### Property Value

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### ItemIdentifiers

The ItemIdentifiers associated with the DataItemIdentifiers in this collection.

```csharp theme={null}
public ItemIdentifierCollection ItemIdentifiers { get; }
```

#### Property Value

[ItemIdentifierCollection](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Results.Dataset.ItemIdentifierCollection.md)

### Name

```csharp theme={null}
public string Name { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### Subtype

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

```csharp theme={null}
public DataSubtype Subtype { get; }
```

#### Property Value

[DataSubtype](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Results.Dataset.DataSubtype.md)

### this\[int]

Gets or sets the element at the specified index.

```csharp theme={null}
public DataItemIdentifier this[int index] { get; set; }
```

#### Property Value

[DataItemIdentifier](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Results.Dataset.DataItemIdentifier.md)

#### Exceptions

[ArgumentOutOfRangeException](https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception)

`index` is not a valid index in the IList\`1.

[NotSupportedException](https://learn.microsoft.com/dotnet/api/system.notsupportedexception)

The property is set and the IList\`1 is read-only.

## Methods

### Add(DataItemIdentifier)

Adds an item to the ICollection\`1.

```csharp theme={null}
public void Add(DataItemIdentifier item)
```

#### Parameters

`item` [DataItemIdentifier](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Results.Dataset.DataItemIdentifier.md)

The object to add to the ICollection\`1.

#### Exceptions

[NotSupportedException](https://learn.microsoft.com/dotnet/api/system.notsupportedexception)

The ICollection\`1 is read-only.

### AddRange(IEnumerable\<DataItemIdentifier>)

```csharp theme={null}
public void AddRange(IEnumerable<DataItemIdentifier> collection)
```

#### Parameters

`collection` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)\<[DataItemIdentifier](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Results.Dataset.DataItemIdentifier.md)>

### Clear()

Removes all items from the ICollection\`1.

```csharp theme={null}
public void Clear()
```

#### Exceptions

[NotSupportedException](https://learn.microsoft.com/dotnet/api/system.notsupportedexception)

The ICollection\`1 is read-only.

### Contains(DataItemIdentifier)

Determines whether the ICollection\`1 contains a specific value.

```csharp theme={null}
public bool Contains(DataItemIdentifier item)
```

#### Parameters

`item` [DataItemIdentifier](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Results.Dataset.DataItemIdentifier.md)

The object to locate in the ICollection\`1.

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

[true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) if `item` is found in the ICollection\`1; otherwise, [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool).

### CopyTo(DataItemIdentifier\[], int)

Copies the elements of the ICollection\`1 to an Array, starting at a particular Array index.

```csharp theme={null}
public void CopyTo(DataItemIdentifier[] array, int arrayIndex)
```

#### Parameters

`array` [DataItemIdentifier](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Results.Dataset.DataItemIdentifier.md)\[]

The one-dimensional Array that is the destination of the elements copied from ICollection\`1. The Array must have zero-based indexing.

`arrayIndex` [int](https://learn.microsoft.com/dotnet/api/system.int32)

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

#### Exceptions

[ArgumentNullException](https://learn.microsoft.com/dotnet/api/system.argumentnullexception)

`array` is [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null).

[ArgumentOutOfRangeException](https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception)

`arrayIndex` is less than 0.

[ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception)

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

### GetEnumerator()

Returns an enumerator that iterates through the collection.

```csharp theme={null}
public IEnumerator<DataItemIdentifier> GetEnumerator()
```

#### Returns

[IEnumerator](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerator-1)\<[DataItemIdentifier](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Results.Dataset.DataItemIdentifier.md)>

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

### GetSelfSuggestedName()

```csharp theme={null}
protected virtual string GetSelfSuggestedName()
```

#### Returns

[string](https://learn.microsoft.com/dotnet/api/system.string)

### IndexOf(DataItemIdentifier)

Determines the index of a specific item in the IList\`1.

```csharp theme={null}
public int IndexOf(DataItemIdentifier item)
```

#### Parameters

`item` [DataItemIdentifier](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Results.Dataset.DataItemIdentifier.md)

The object to locate in the IList\`1.

#### Returns

[int](https://learn.microsoft.com/dotnet/api/system.int32)

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

### Insert(int, DataItemIdentifier)

Inserts an item to the IList\`1 at the specified index.

```csharp theme={null}
public void Insert(int index, DataItemIdentifier item)
```

#### Parameters

`index` [int](https://learn.microsoft.com/dotnet/api/system.int32)

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

`item` [DataItemIdentifier](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Results.Dataset.DataItemIdentifier.md)

The object to insert into the IList\`1.

#### Exceptions

[ArgumentOutOfRangeException](https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception)

`index` is not a valid index in the IList\`1.

[NotSupportedException](https://learn.microsoft.com/dotnet/api/system.notsupportedexception)

The IList\`1 is read-only.

### InsertRange(int, IEnumerable\<DataItemIdentifier>)

```csharp theme={null}
public void InsertRange(int index, IEnumerable<DataItemIdentifier> collection)
```

#### Parameters

`index` [int](https://learn.microsoft.com/dotnet/api/system.int32)

`collection` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)\<[DataItemIdentifier](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Results.Dataset.DataItemIdentifier.md)>

### Remove(DataItemIdentifier)

Removes the first occurrence of a specific object from the ICollection\`1.

```csharp theme={null}
public bool Remove(DataItemIdentifier item)
```

#### Parameters

`item` [DataItemIdentifier](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net8-reference/OpenTD.Results.Dataset.DataItemIdentifier.md)

The object to remove from the ICollection\`1.

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

[true](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) if `item` was successfully removed from the ICollection`1; otherwise, [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool). This method also returns [false](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool) if <code className="paramref">item</code> is not found in the original ICollection`1.

#### Exceptions

[NotSupportedException](https://learn.microsoft.com/dotnet/api/system.notsupportedexception)

The ICollection\`1 is read-only.

### RemoveAt(int)

Removes the IList\`1 item at the specified index.

```csharp theme={null}
public void RemoveAt(int index)
```

#### Parameters

`index` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The zero-based index of the item to remove.

#### Exceptions

[ArgumentOutOfRangeException](https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception)

`index` is not a valid index in the IList\`1.

[NotSupportedException](https://learn.microsoft.com/dotnet/api/system.notsupportedexception)

The IList\`1 is read-only.

### RemoveRange(int, int)

```csharp theme={null}
public void RemoveRange(int index, int count)
```

#### Parameters

`index` [int](https://learn.microsoft.com/dotnet/api/system.int32)

`count` [int](https://learn.microsoft.com/dotnet/api/system.int32)

### ToString()

Returns a string that represents the current object.

```csharp theme={null}
public override string ToString()
```

#### Returns

[string](https://learn.microsoft.com/dotnet/api/system.string)

A string that represents the current object.
