C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






To check if a string is palindrome or not


Posted Date: 07 Jun 2008    Resource Type: Code Snippets    Category: Mathematics
Author: shyamalendu prustyMember Level: Silver    
Rating: Points: 10



bool IsPalindrome (string CheckString)
{
if (CheckString == null || CheckString.Length == 0)
{
return false;
}
for (int i = 0; i < CheckString.Length / 2; i++)
{
if (CheckString[i] != CheckString[CheckString.Length - 1 - i])
{
return false;
}
}
return true;
}

If the function above returns true, the string you passed is a palindrome.




Responses

Author: http://venkattechnicalblog.blogspot.com/    09 Jun 2008Member Level: Diamond   Points : 1


Provide some explanation for your code snippet.

Regards,
Venkatesan Prabu . J


Author: shyamalendu prusty    23 Jun 2008Member Level: Silver   Points : 1
Palindrome check is required to know whether the word entered is a palindrom or not?

e.g.

Some men interpret nine memos


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Buble sorter
Previous Resource: How to create Pascal Triangle
Return to Discussion Resource Index
Post New Resource
Category: Mathematics


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use