// Palindrome
using System;
class Mainclass{
public static void Main(string[] args){
string user_input = Console.ReadLine();
char[] before_reversing = new char[user_input.Length];
for(int i=0;i<user_input.Length;i++){
before_reversing[i] = user_input[i];
}
char[] after_reversing = Array.Reverse(before_reversing);
if (before_reversing == after_reversing) {
Console.WriteLine("It is a palindrome");
}
else{
Console.WriteLine("Not a palindrome");
}
}
}
I can't unable run the code due to an error ... can someone help I'm new to programming in C Sharp. And practicing my coding skill and got stuck in palindrome.