Click here to Skip to main content
12,243,058 members (40,448 online)
Click here to Skip to main content

Tagged as

Stats

4.7K views
6 downloads
1 bookmarked
Posted

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

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

Revisions


  

Compare Revision Minor Date Status Editor
2 - publicly available Yes 7-Feb-11 2:07 Available Deeksha Shenoy
1 No 3-Feb-11 15:15 Composing ZamirF

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.160426.1 | Last Updated 7 Feb 2011
Article Copyright 2011 by ZamirF
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid