How to check if string is palindrome in VB.NET

1 Answer

0 votes
Module Module1

    Sub Main()

        Dim s As String = "abcba"

        Dim rev As String = StrReverse(s)

        If (rev = s) Then
            Console.WriteLine("Palindrome")
        Else
            Console.WriteLine("Not Palindrome")
        End If

    End Sub

End Module

' run:
' 
' Palindrome

 



answered May 19, 2017 by avibootz
...