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

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

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

Definition at line 4527 of file Enumerable.cs.

4528 {
4529 if (source == null)
4530 {
4531 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.source);
4532 }
4533 if (predicate == null)
4534 {
4535 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.predicate);
4536 }
4537 long num = 0L;
4538 foreach (TSource item in source)
4539 {
4540 if (predicate(item))
4541 {
4542 num = checked(num + 1);
4543 }
4544 }
4545 return num;
4546 }

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