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

◆ IndexOf() [3/6]

override int System.Collections.ArrayList.IListWrapper.IndexOf ( object value,
int startIndex,
int count )
inline

Definition at line 282 of file ArrayList.cs.

283 {
284 if (startIndex < 0 || startIndex > Count)
285 {
286 throw new ArgumentOutOfRangeException("startIndex", SR.ArgumentOutOfRange_Index);
287 }
288 if (count < 0 || startIndex > Count - count)
289 {
290 throw new ArgumentOutOfRangeException("count", SR.ArgumentOutOfRange_Count);
291 }
292 int num = startIndex + count;
293 if (value == null)
294 {
295 for (int i = startIndex; i < num; i++)
296 {
297 if (_list[i] == null)
298 {
299 return i;
300 }
301 }
302 return -1;
303 }
304 for (int j = startIndex; j < num; j++)
305 {
306 object obj = _list[j];
307 if (obj != null && obj.Equals(value))
308 {
309 return j;
310 }
311 }
312 return -1;
313 }

References System.Collections.ArrayList.IListWrapper._list, System.SR.ArgumentOutOfRange_Count, System.SR.ArgumentOutOfRange_Index, System.count, System.Collections.ArrayList.IListWrapper.Count, System.obj, System.startIndex, and System.value.