Click here to Skip to main content
12,452,721 members (51,800 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


1 download
1 bookmarked

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

, 15 Feb 2011 CPOL
Rate this:
Please Sign up or sign in to vote.
How about this:private bool IsPalindrome(string stringToCheck){ return stringToCheck.ToLower() == (new string(stringToCheck.Reverse().ToArray())).ToLower();}
How about this:
private bool IsPalindrome(string stringToCheck)
    return stringToCheck.ToLower()
               == (new string(stringToCheck.Reverse().ToArray())).ToLower();


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


About the Author

United States United States
No Biography provided

You may also be interested in...

Comments and Discussions

-- There are no messages in this forum --
| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160826.1 | Last Updated 15 Feb 2011
Article Copyright 2011 by UbaiSandouk
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid