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 different between Boxing and Unboxing?
What is difference between singleton and static class in c#?
Classes and structs can be declared as static, is this statement true or false?
What is the best dependency injection c#?
Can you instantiate a struct without using a new operator in c#?
What is xml serialization in c#?
Why can’t struct be used instead of class for storing entity?
Can arraylist hold primitive types?
What is parsing?
Wht executescaler method is used?
What is the usage of Enumeration in C# Programming and is it good to use or not ?
Is null or empty in c#?
What to implement on my class Finalize or IDisposable
Why do we use namespace in c#?
What is difference between array and collection?