Tag Archives: Code sample

How to check whether string is a palindrome or not using vb.net

A palindrome is a word, number, or other sequence of units that can be read the same way in either direction(backward as forward) such as madam, mom and noon. A Similar to string, palindromic number is a number whose digits, with decimal representation are the same read backward such as 5885.

Palindrome string
Palindrome string

Through below code sample,you can check whether string is a palindrome or not using vb.net. There are three methods to check the that given string is palindrome or not: using ‘StrReverse()’ method, using ‘While’ and ‘If’ statement and using ‘For’ and ‘If’ statement.

VB.Net provides us StrReverse() function which returns a string that contains the same characters as Expression, but in the opposite order.

Continue reading How to check whether string is a palindrome or not using vb.net