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

◆ Find< T >()

static ? T System.Array.Find< T > ( T[] array,
Predicate< T > match )
inlinestatic

Definition at line 1630 of file Array.cs.

1631 {
1632 if (array == null)
1633 {
1634 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
1635 }
1636 if (match == null)
1637 {
1638 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.match);
1639 }
1640 for (int i = 0; i < array.Length; i++)
1641 {
1642 if (match(array[i]))
1643 {
1644 return array[i];
1645 }
1646 }
1647 return default(T);
1648 }

References System.array, System.match, and System.ThrowHelper.ThrowArgumentNullException().