Click here to Skip to main content
15,886,963 members
Articles / Programming Languages / C#

To check string is palindrome or not in .NET (C#)

Rate me:
Please Sign up or sign in to vote.
4.60/5 (5 votes)
8 Mar 2011CPOL 12.7K   3   1  
You forgot about the non-alphabetic characters in a palindrome.A string like "Madam, in Eden I'm Adam" will produce False in your code, but it is a palindrome!Provide you my version. I also put it in extension method:public static class StringExtension{ public static bool...

Views

Daily Counts

Downloads

Weekly Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer DevelopEx
Ukraine Ukraine
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions