Latest posts on category "ASP.Net"

C# program for reversing a number

ASP.Net     2203
No Comments    

A number can be reverse in multiple ways. We can use the built-in methods or write some logic to perform the same. System.Array class is having method called as Reverse(), which can be used to perform the reversal in a single line. Only thing is, it takes array as a parameter. So, if we have the string, then we can convert it to the character array using .ToCharArray() method and pass that array to the Reverse() method. That’s one way to do it. Please check the below program for the implementation of this method and the other ways to do the same thing.