System.Data.DataTable.FindRow C# (CSharp) Method

FindRow() private method

private FindRow ( DataKey key, object values ) : DataRow
key DataKey
values object
return DataRow
        private DataRow FindRow(DataKey key, object[] values)
        {
            Index index = GetIndex(NewIndexDesc(key));
            Range range = index.FindRecords(values);
            if (range.IsNull)
            {
                return null;
            }
            return _recordManager[index.GetRecord(range.Min)];
        }

Usage Example

Example #1
0
 /// <summary>
 /// find row in the datatable
 /// </summary>
 /// <param name="table">table</param>
 /// <param name="filter">filter</param>
 /// <returns></returns>
 public static DataRow FindRow(this System.Data.DataTable table, string filter)
 {
     return(table.FindRow(filter, DataViewRowState.CurrentRows));
 }
DataTable