Class NetCdfAttribute
A NetCDF attribute: text, or one or more numbers. Global attributes belong to the file; variable attributes to a variable.
public sealed class NetCdfAttribute
- Inheritance
-
NetCdfAttribute
- Inherited Members
Constructors
NetCdfAttribute(string, NetCdfDataType, IReadOnlyList<double>)
Creates a numeric attribute.
public NetCdfAttribute(string name, NetCdfDataType dataType, IReadOnlyList<double> numbers)
Parameters
namestringThe attribute's name.
dataTypeNetCdfDataTypeThe type the file stores the numbers as.
numbersIReadOnlyList<double>The numbers.
NetCdfAttribute(string, string)
Creates a text attribute.
public NetCdfAttribute(string name, string text)
Parameters
Properties
DataType
The type the file stores the values as.
public NetCdfDataType DataType { get; }
Property Value
FirstNumber
The first number, or null for a text or empty attribute.
public double? FirstNumber { get; }
Property Value
IsText
Whether the attribute holds text.
public bool IsText { get; }
Property Value
Name
The attribute's name, for example "units".
public string Name { get; }
Property Value
Numbers
The numbers of a numeric attribute; empty for a text attribute.
public IReadOnlyList<double> Numbers { get; }
Property Value
Text
The text of a text attribute; otherwise null.
public string? Text { get; }
Property Value
Methods
ToString()
Returns the text, or the numbers separated by commas.
public override string ToString()