public static bool IsPalindromeNumer(int n)
{
var reversedNumber = NumberReverse.GetReversedNumber(n);
if (reversedNumber == n)
{
return true;
}
else
{
return false;
}
}
How it works:
While most of the functionality is fulfilled by the Number Reversal logic, we would just add a condition to check if the reversed number is equal to the original number or not.