Click here to Skip to main content
11,641,064 members (65,585 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.6K 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

You may also be interested in...

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