.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal

Home >> Code Snippets >> Visual Studio >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Verify given string is palindrome or not

Posted By:satyapriyanayak       Posted Date: January 13, 2015    Points: 40    Category: Visual Studio    URL: http://www.dotnetspark.com  

In this Code Snippets we will know how to Verify given string is palindrome or not.

A palindrome is a word, phrase, number, or other sequence of symbols or elements, whose meaning may be interpreted the same way in either forward or reverse direction.
Ex:- ana

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim s1 As String
        Dim s2 As String
        s1 = Interaction.InputBox("Enter a string")
        s2 = StrReverse(s1)
        If (s1 = s2) Then
            MessageBox.Show("Given string is palindrome")
            MessageBox.Show("Given string is not palindrome")
        End If
    End Sub
End Clas


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend