Write a VB.NET program to check whether the entered string is a palindrome or not.

Answer;

Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim str, rev As String
        str = TextBox1.Text
        rev = StrReverse(str)
        If (str = rev) Then
            MessageBox.Show("String is Palindrome: " & str)
        Else
            MessageBox.Show("String is not Palindrome: " & str)
        End If
    End Sub
End Class
Scroll to Top