> ## 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 DataArray

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

Data is returned from Datasets in the form of DataArrays, which in addition to
containing the actual data, also know the physical dimension of the data, what
units it is in, and have a reference to the Dataset it came from. Use the GetValues
methods to get the data as lists of doubles, or use DataArrays directly as
inputs to SimplePlots.

```csharp theme={null}
public class DataArray : IEnumerable<double>, IEnumerable
```

## Inheritance

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

#### Derived

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

## Implements

[IEnumerable\<double>](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

### DataArray(DataItemIdentifier, IEnumerable\<double>, UnitsData)

```csharp theme={null}
public DataArray(DataItemIdentifier dataItem, IEnumerable<double> values, UnitsData units)
```

#### Parameters

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

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

`units` UnitsData

### DataArray()

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

### DataArray(IEnumerable\<double>)

Initializes a new instance of the [DataArray](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Results.Dataset.DataArray.md) class, assuming dimensionless data.

```csharp theme={null}
public DataArray(IEnumerable<double> values)
```

#### Parameters

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

The values.

### DataArray(DataSubtype, IEnumerable\<double>, UnitsData, ItemIdentifier)

```csharp theme={null}
public DataArray(DataSubtype subtype, IEnumerable<double> values, UnitsData units, ItemIdentifier item = null)
```

#### Parameters

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

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

`units` UnitsData

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

### DataArray(DataArray)

```csharp theme={null}
public DataArray(DataArray x)
```

#### Parameters

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

## Fields

### ValuesSI

```csharp theme={null}
protected List<double> ValuesSI
```

#### Field Value

[List](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)\<[double](https://learn.microsoft.com/dotnet/api/system.double)>

## Properties

### AutoCommenter

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

#### Property Value

AutoCommenter

### AutoNamer

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

#### Property Value

AutoNamer

### Comment

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

#### Property Value

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

### Count

The number of items in this DataArray.

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

#### Property Value

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

### Dimension

The physical dimension of this data.

```csharp theme={null}
public UnitsData.UnitsType Dimension { get; }
```

#### Property Value

UnitsData.UnitsType

### InternalSuggestedComment

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

#### Property Value

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

### InternalSuggestedName

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

#### Property Value

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

### IsInteger

Returns true if the subtype of this data represents integer data.

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

#### Property Value

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

### Name

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

#### Property Value

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

### SourceDataItem

Combines the SourceItem and Subtype. If either are null, this is null.

```csharp theme={null}
public DataItemIdentifier SourceDataItem { get; }
```

#### Property Value

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

### SourceDataset

The source Dataset for this data.

```csharp theme={null}
public virtual IDataset SourceDataset { get; }
```

#### Property Value

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

### SourceItem

Identifies the item (node, lump, register, etc.) this data came from.

```csharp theme={null}
public virtual ItemIdentifier SourceItem { get; }
```

#### Property Value

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

### Subtype

The DataSubtype (T, TL, PL, GTX, etc.)

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

#### Property Value

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

### this\[int]

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

#### Property Value

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

## Methods

### CheckData()

```csharp theme={null}
protected virtual void CheckData()
```

### GetEnumerator()

Returns an enumerator that iterates through the collection.

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

#### Returns

[IEnumerator](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerator-1)\<[double](https://learn.microsoft.com/dotnet/api/system.double)>

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

### GetSelfSuggestedComment()

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

#### Returns

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

### GetSelfSuggestedName()

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

#### Returns

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

### GetValues()

Gets the data in the current WorkingUnits.

```csharp theme={null}
public List<double> GetValues()
```

#### Returns

[List](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)\<[double](https://learn.microsoft.com/dotnet/api/system.double)>

List\<System.Double>.

#### See Also

Units.WorkingUnits

### GetValues(UnitsData)

Gets the data in the units provided.

```csharp theme={null}
public virtual List<double> GetValues(UnitsData units)
```

#### Parameters

`units` UnitsData

The units to return the data in.

#### Returns

[List](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)\<[double](https://learn.microsoft.com/dotnet/api/system.double)>

List\<System.Double>.

### SetValues(IEnumerable\<double>, DataSubtype, UnitsData, ItemIdentifier)

```csharp theme={null}
public virtual void SetValues(IEnumerable<double> values, DataSubtype subtype = null, UnitsData units = null, ItemIdentifier item = null)
```

#### Parameters

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

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

`units` UnitsData

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

### 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.

## Operators

### implicit operator List\<double>(DataArray)

```csharp theme={null}
public static implicit operator List<double>(DataArray x)
```

#### Parameters

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

#### Returns

[List](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)\<[double](https://learn.microsoft.com/dotnet/api/system.double)>

### implicit operator List\<DataArray>(DataArray)

```csharp theme={null}
public static implicit operator List<DataArray>(DataArray x)
```

#### Parameters

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

#### Returns

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

## See Also

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