Create a C# program that requests a string from the user and implements a recursive function to reverse a string of characters.
public class ReverseStringRecusively
public static void Main(string args)
string text = Console.ReadLine();
public static string Reverse(string text)
if (text.Length <= 1)
char firstLetter = text;
string rest = text.Substring(1);
return Reverse(rest) + firstLetter;
Practice C# anywhere with the free app for Android devices.
Learn C# at your own pace, the exercises are ordered by difficulty.
Your donations support our work and contribute to the maintenance of the app.
Own and third party cookies to improve our services. If you go on surfing, we will consider you accepting its use.