RosettaCodeData/Task/Palindrome-detection/C-sharp/palindrome-detection-1.cs
2023-07-01 13:44:08 -04:00

21 lines
415 B
C#

using System;
class Program
{
static string Reverse(string value)
{
char[] chars = value.ToCharArray();
Array.Reverse(chars);
return new string(chars);
}
static bool IsPalindrome(string value)
{
return value == Reverse(value);
}
static void Main(string[] args)
{
Console.WriteLine(IsPalindrome("ingirumimusnocteetconsumimurigni"));
}
}