I desperatly need the code on testing if a string is a palindrome using vb.net console application.I have searched every where and was only assisted in java.
please help me.
this assignment is due on Thursday and today is Monday the 27 Feb 2006
Thanx
Sma
Loading
SolitairePosted Feb 27, 2006, 7:36 PM
Don't expect anyone to do your homework assignment for you.
Here is one way to do it: First get the length of the string and save each character to an array. Reverse the array and copy the characters to a new string variable. Then compare the original string to the reverse string (keeping all the characters either upper or lowercase). If it matches, then it's a palindrome.
Another way: Use a For loop stepping backwards from the length of the string. Extract each letter using the value of the control variable and concatenate it to a new string.