Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ IndexOf() [1/4]

int System.Data.DataView.IndexOf ( DataRowView rowview)
inlinepackageinherited

Definition at line 834 of file DataView.cs.

835 {
836 if (rowview != null)
837 {
838 if (_addNewRow == rowview.Row)
839 {
840 return Count - 1;
841 }
842 if (_index != null && DataRowState.Detached != rowview.Row.RowState && _rowViewCache.TryGetValue(rowview.Row, out var value) && value == rowview)
843 {
845 }
846 }
847 return -1;
848 }
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
Dictionary< DataRow, DataRowView > _rowViewCache
Definition DataView.cs:102
int IndexOfDataRowView(DataRowView rowview)
Definition DataView.cs:850

References System.Data.DataView._addNewRow, System.Data.DataView._index, System.Data.DataView._rowViewCache, System.Data.DataView.Count, System.Data.DataView.IndexOfDataRowView(), System.Collections.Generic.Dictionary< TKey, TValue >.TryGetValue(), and System.value.