10 lines
816 B
Plaintext
10 lines
816 B
Plaintext
== Why is this an issue?
|
|
|
|
Both the `List.TrueForAll` method and the `IEnumerable.All` method can be used to check if all list elements satisfy a given condition in a collection. However, `List.TrueForAll` can be faster than `IEnumerable.All` for `List` objects. The performance difference may be minor for small collections, but for large collections, it can be noticeable.
|
|
|
|
*Applies to*
|
|
|
|
* https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.list-1.trueforall[List]
|
|
* https://learn.microsoft.com/en-us/dotnet/api/system.array.trueforall[Array]
|
|
* https://learn.microsoft.com/en-us/dotnet/api/system.collections.immutable.immutablelist-1.trueforall[ImmutableList]
|
|
* https://learn.microsoft.com/en-us/dotnet/api/system.collections.immutable.immutablelist-1.builder.trueforall[ImmutableList.Builder] |