=== Code examples

==== Noncompliant code example

[source,vbnet,diff-id=1,diff-type=noncompliant]
----
Function ValueExists(data As HashSet(Of Integer)) As Boolean 
    Return data.Any(Function(x) x = 42)
End Function
----

[source,vbnet,diff-id=2,diff-type=noncompliant]
----
Function ValueExists(data As List(Of Integer)) As Boolean 
    Return data.Any(Function(x) x = 42)
End Function
----

==== Compliant solution

[source,vbnet,diff-id=1,diff-type=compliant]
----
Function ValueExists(data As HashSet(Of Integer)) As Boolean 
    Return data.Contains(42)
End Function
----

[source,vbnet,diff-id=2,diff-type=compliant]
----
Function ValueExists(data As List(Of Integer)) As Boolean 
    Return data.Contains(42)
End Function
----
