Class ResultTable
public class ResultTable
- Inheritance
-
ResultTable
- Extension Methods
Properties
Header
Stores the header of each column.
public List<string> Header { get; set; }
Property Value
this[int]
Gets a table numeric column by its zero-based position.
public IEnumerable<double> this[int column] { get; }
Parameters
column
intZero-based position
Property Value
- IEnumerable<double>
Result column.
this[string]
Gets a table numeric column by its header.
public IEnumerable<double> this[string column] { get; }
Parameters
column
stringColumn header
Property Value
- IEnumerable<double>
Result column.
Rows
Stores the rows.
public List<List<string>> Rows { get; set; }
Property Value
Methods
Compare(ResultTable)
Returns a text specifying how the tables are different. Empty if equal.
public string Compare(ResultTable table)
Parameters
table
ResultTableTable to compare with.
Returns
- string
Text message on how the tables are different.
Equals(ResultTable)
Determines whether 2 tables are equal.
public bool Equals(ResultTable table)
Parameters
table
ResultTable
Returns
- bool
true if the tables are equal; otherwise, false.
Get(int, int)
Get text value from a row and header positions.
public double Get(int rowNumber, int columnNumber)
Parameters
Returns
- double
Text value.
Get(int, string)
Get numeric value from a row position and header name
public double Get(int rowNumber, string columnHeader)
Parameters
Returns
- double
Numeric value.
Get(string, int)
Get numeric value from a row header and column position.
public double Get(string rowHeader, int columnNumber)
Parameters
Returns
- double
Numeric value.
Get(string, string)
Get numeric value from a row header and column header name.
public double Get(string rowHeader, string columnHeader)
Parameters
Returns
- double
Numeric value.
GetColumn(int)
Gets a table numeric column by its zero-based position. Non-numeric values (blank,-, etc) are returned as 0.
public IEnumerable<double> GetColumn(int column)
Parameters
column
intZero-based position
Returns
- IEnumerable<double>
Result column.
GetColumn(string)
Gets a table numeric column by its header. Non-numeric values (blank,-, etc) are returned as 0.
public IEnumerable<double> GetColumn(string column)
Parameters
column
stringColumn header
Returns
- IEnumerable<double>
Result column.
GetData(int, int)
Gets a Dictionary from a result table with a specified column as string Keys and a specified column as numeric Values. Non-numeric values (blank,-, etc) are returned as 0.
public Dictionary<string, double> GetData(int componentColumn, int valueColumn)
Parameters
componentColumn
intZero-based column position for generating the Keys
valueColumn
intZero-based column position for generating the Values
Returns
- Dictionary<string, double>
A Dictionary with Keys from column 1 and Values from column 2
GetData(int, string)
Gets a Dictionary from a result table with a specified column as string Keys and a specified column as numeric Values. Non-numeric values (blank,-, etc) are returned as 0.
public Dictionary<string, double> GetData(int componentColumn, string valueColumn)
Parameters
componentColumn
intZero-based column position for generating the Keys
valueColumn
stringColumn header for generating the Values
Returns
- Dictionary<string, double>
A Dictionary with Keys from column 1 and Values from column 2
GetData(string, int)
Gets a Dictionary from a result table with a specified column as string Keys and a specified column as numeric Values. Non-numeric values (blank,-, etc) are returned as 0.
public Dictionary<string, double> GetData(string componentColumn, int valueColumn)
Parameters
componentColumn
stringColumn header for generating the Keys
valueColumn
intZero-based column position for generating the Values
Returns
- Dictionary<string, double>
A Dictionary with Keys from column 1 and Values from column 2
GetData(string, string)
Gets a Dictionary from a result table with a specified column as string Keys and a specified column as numeric Values. Non-numeric values (blank,-, etc) are returned as 0.
public Dictionary<string, double> GetData(string componentColumn, string valueColumn)
Parameters
componentColumn
stringColumn header for generating the Keys
valueColumn
stringColumn header for generating the Values
Returns
- Dictionary<string, double>
A Dictionary with Keys from column 1 and Values from column 2
GetData<T>(int, int)
Gets a Dictionary from a result table with a specified column as string Keys and a specified column as T Values. Blank cells are not returned.
public Dictionary<string, T> GetData<T>(int componentColumn, int valueColumn)
Parameters
componentColumn
intZero-based column position for generating the Keys
valueColumn
intZero-based column position for generating the Values
Returns
- Dictionary<string, T>
A Dictionary with Keys from column 1 and Values from column 2
Type Parameters
T
double or string
GetData<T>(int, string)
Gets a Dictionary from a result table with a specified column as string Keys and a specified column as T Values. Blank cells are not returned.
public Dictionary<string, T> GetData<T>(int componentColumn, string valueColumn)
Parameters
componentColumn
intZero-based column position for generating the Keys
valueColumn
stringColumn header for generating the Values
Returns
- Dictionary<string, T>
A Dictionary with Keys from column 1 and Values from column 2
Type Parameters
T
double or string
GetData<T>(string, int)
Gets a Dictionary from a result table with a specified column as string Keys and a specified column as T Values. Blank cells are not returned.
public Dictionary<string, T> GetData<T>(string componentColumn, int valueColumn)
Parameters
componentColumn
stringColumn header for generating the Keys
valueColumn
intZero-based column position for generating the Values
Returns
- Dictionary<string, T>
A Dictionary with Keys from column 1 and Values from column 2
Type Parameters
T
double or string
GetData<T>(string, string)
Gets a Dictionary from a result table with a specified column as string Keys and a specified column as T Values. Blank cells are not returned.
public Dictionary<string, T> GetData<T>(string componentColumn, string valueColumn)
Parameters
componentColumn
stringColumn header for generating the Keys
valueColumn
stringColumn header for generating the Values
Returns
- Dictionary<string, T>
A Dictionary with Keys from column 1 and Values from column 2
Type Parameters
T
double or string
GetText(int, int)
Get text value from a row and header positions.
public string GetText(int rowNumber, int columnNumber)
Parameters
Returns
- string
Text value.
GetText(int, string)
Get text value from a row position and header name
public string GetText(int rowNumber, string columnHeader)
Parameters
Returns
- string
Text value.
GetText(string, int)
Get text value from a row header and column position.
public string GetText(string rowHeader, int columnNumber)
Parameters
Returns
- string
Text value.
GetText(string, string)
Get text value from a row header and column header name.
public string GetText(string rowHeader, string columnHeader)
Parameters
Returns
- string
Text value.
GetTextColumn(int)
Gets a table text column by its zero-based position.
public IEnumerable<string> GetTextColumn(int column)
Parameters
column
intZero-based position
Returns
- IEnumerable<string>
Result column.
GetTextColumn(string)
Gets a table text column by its header. Blank cells are not returned.
public IEnumerable<string> GetTextColumn(string column)
Parameters
column
stringColumn header
Returns
- IEnumerable<string>
Result column.
Operators
operator ==(ResultTable, ResultTable)
Determines whether 2 tables are different.
public static bool operator ==(ResultTable a, ResultTable b)
Parameters
a
ResultTableFirst table to compare
b
ResultTableSecond string to compare.
Returns
- bool
true if the tables are different; otherwise, false.
operator !=(ResultTable, ResultTable)
Determines whether 2 tables are equal.
public static bool operator !=(ResultTable a, ResultTable b)
Parameters
a
ResultTableFirst table to compare
b
ResultTableSecond string to compare.
Returns
- bool
true if the tables are equal; otherwise, false.