Is Palindrome Number
This algorithm check whether a given number is palindrome number or not. A palindrome number is a number such that if we reverse it, it will not change.
Private Shared Function Reverse(num As Integer) As Integer
Dim _reverse As Integer = 0
While num <> 0
_reverse *= 10
_reverse += num Mod 10
num \= 10
End While
Return _reverse
End Function
Public Shared Function IsPalindromeNumber(num As Integer) As Boolean
Return num = Reverse(num)
End Function
Example
Dim _isPalindromeNumber = IsPalindromeNumber(-4554)
Output
True