=== Code examples

==== Noncompliant code example

[source,vbnet,diff-id=1,diff-type=noncompliant]
----
Public Function AreAllEven(data As List(Of Integer)) As Boolean
    Return data.All(Function(x) x Mod 2 = 0)
End Function
----

[source,vbnet,diff-id=2,diff-type=noncompliant]
----
Public Function AreAllEven(data As Integer()) As Boolean
    Return data.All(Function(x) x Mod 2 = 0)
End Function
----

==== Compliant solution

[source,vbnet,diff-id=1,diff-type=compliant]
----
Public Function AreAllEven(data As List(Of Integer)) As Boolean
    Return data.TrueForAll(Function(x) x Mod 2 = 0)
End Function
----

[source,vbnet,diff-id=2,diff-type=compliant]
----
Public Function AreAllEven(data As Integer()) As Boolean
    Return Array.TrueForAll(data, Function(x) x Mod 2 = 0)
End Function
----