public int GetColumnOrdinal(ColumnName columnName) { if (columnName.CompareTo (new ColumnName (0)) == 0) return 0; else return -1; }
/// <summary> /// Compares two DataSourceField objects based on the ColumnName. /// </summary> /// <param name="other"></param> /// <returns></returns> public int CompareTo(DataTableField other) { if (other == default(DataTableField)) { return(1); } return(ColumnName.CompareTo(other.ColumnName)); }
/// <summary> /// Compares the current FileDataRecord with another FileDataRecord. /// </summary> /// <param name="other">The other.</param> /// <returns>A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: /// Less than zero - This object is less than the other parameter. /// Zero - This object is equal to other. /// Greater than zero - This object is greater than other. </returns> public int CompareTo(FileDataColumn other) { return(ColumnName.CompareTo(other.ColumnName)); }