Constructs a new VariableCollection from an IDataReader.
Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (Extreme.Numerics)
Syntax
| Visual Basic (Declaration) |
|---|
Public Sub New ( _ reader As IDataReader, _ provider As IFormatProvider _ ) |
| C# |
|---|
public VariableCollection ( IDataReader reader, IFormatProvider provider ) |
| C++ |
|---|
public: VariableCollection ( IDataReader^ reader, IFormatProvider^ provider ) |
Parameters
- reader (System.Data.IDataReader)
- An object that implements the IDataReader interface, such as SqlDataReader or OleDbDataReader
- provider (System.IFormatProvider)
- The IFormatProvider used to interpret the data in reader.
Remarks
The columns of the table are converted into variables according to the following rules:
- If the column contains unique values (the DataColumn's Unique property is true), then the column is interpreted as a KeyVariable.
- If the column's data type is numerical, the column is interpreted as a NumericalVariable.
- If the column's data type is a date or time value, the column is interpreted as a DateTimeVariable.
- Otherwise, the column is interpreted as a CategoricalVariable.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | reader is nullNothingnullptr. |