Click here to Skip to main content
11,495,758 members (67,680 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

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

, 6 Feb 2011 CPOL 3.3K 6 1
How about:public bool IsPalindrome(string stringToCheck){ char[] rev = stringToCheck.Reverse().ToArray(); return (stringToCheck.Equals(new string(rev), StringComparison.OrdinalIgnoreCase));}

Views

Downloads

License

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

Share

About the Author

ZamirF

United States United States
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150520.1 | Last Updated 7 Feb 2011
Article Copyright 2011 by ZamirF
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid