Click here to Skip to main content
13,139,682 members (54,695 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


1 bookmarked
Posted 15 Feb 2011

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

, 15 Feb 2011
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
This member doesn't quite have enough reputation to be able to display their biography and homepage.

You may also be interested in...

Comments and Discussions

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