How to check if substring is contained in a string with VB.NET

1 Answer

0 votes
Module Module1

    Sub Main()

        Dim s As String = "VB.NET, PHP, JAVA"

        If Not s.IndexOf("PHP") = -1 Then
            Console.WriteLine("Found")
        Else
            Console.WriteLine("Not Found")
        End If

    End Sub

End Module


' run:
' 
' Found

 



answered Oct 2, 2018 by avibootz
...