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

◆ Count< TSource >() [2/2]

static int System.Linq.Enumerable.Count< TSource > ( this IEnumerable< TSource > source,
Func< TSource, bool > predicate )
inlinestatic

Definition at line 4462 of file Enumerable.cs.

4463 {
4464 if (source == null)
4465 {
4466 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.source);
4467 }
4468 if (predicate == null)
4469 {
4470 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.predicate);
4471 }
4472 int num = 0;
4473 foreach (TSource item in source)
4474 {
4475 if (predicate(item))
4476 {
4477 num = checked(num + 1);
4478 }
4479 }
4480 return num;
4481 }

References System.item, System.Linq.predicate, System.Linq.source, and System.Linq.ThrowHelper.ThrowArgumentNullException().