=== Code examples

==== Noncompliant code example

[source,csharp,diff-id=1,diff-type=noncompliant]
----
public bool AreAllEven(List<int> data) =>
    data.All(x => x % 2 == 0);
----

[source,csharp,diff-id=2,diff-type=noncompliant]
----
public bool AreAllEven(int[] data) =>
    data.All(x => x % 2 == 0);
----

==== Compliant solution

[source,csharp,diff-id=1,diff-type=compliant]
----
public bool AreAllEven(List<int> data) =>
    data.TrueForAll(x => x % 2 == 0);
----

[source,csharp,diff-id=2,diff-type=compliant]
----
public bool AreAllEven(int[] data) =>
    Array.TrueForAll(data, x => x % 2 == 0);
----