How to find the reverse of a number using C# ?

Below is a sample code snippet that demonstrates how to find the reverse of a number using C# .

How to find the reverse of a number using C# ?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AbundantcodeConsoleApp
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            // How to find the reverse of a number using C# ?
            int Input = 2985;
            int ReverseNumber = 0;
            while (Input > 0)
            {
                int rem = Input % 10;
                ReverseNumber = (ReverseNumber * 10) + rem;
                Input = Input / 10;

            }
            Console.WriteLine("Output : {0}", ReverseNumber);
            Console.ReadKey();
        }
    }

    
}
1