Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

palindrome number c#

    static bool IsPalindrome(int n)
    {
        return n.ToString() == Reverse(n.ToString());
    }

    static string Reverse(string str)
    {
        return new string(str.ToCharArray().Reverse().ToArray());
    }
Source by icodeblock.blogspot.com #
 
PREVIOUS NEXT
Tagged: #palindrome #number
ADD COMMENT
Topic
Name
3+7 =