Answer Posted / karthi sanjivi
class Program
{
static void Main()
{
Console.WriteLine("Please Enter Value : ");
string _strValue = Console.ReadLine();
bool res = CheckPalindrome(_strValue);
Console.WriteLine(res);
Console.ReadLine();
}
private static bool CheckPalindrome(string _strValue)
{
string _strTempValue = _strValue;
string _strRevValue = string.Empty;
char[] ch = _strTempValue.ToCharArray();
Array.Reverse(ch);
_strRevValue = new string(ch);
return (_strRevValue == _strValue);
}
}
Is This Answer Correct ? | 7 Yes | 6 No |
Post New Answer View All Answers
What is throw in c#?
What are static and dynamic variables?
What is array and arraylist?
What is access modifier in c#?
What is parsing?
What does int32 mean in c#?
Why do I get a "cs5001: does not have an entry point defined" error when compiling?
Is namespace necessary in c#?
Why do we use abstraction in c#?
Explain polymorphism in c# with a simple example?
What is the difference between method parameters and method arguments. Give an example?
Are c# references the same as c++ references?
What is returned if you pass the value 12.34 to the parsefloat () function?
What are c# attributes and its significance?
How we convert private assembly into public assembly?