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 hashtable in c# with example?
How can I create a process that is running a supplied native executable (e.g., Cmd.exe)?
Can properties be overloaded in c#?
What do you mean by synchronous and asynchronous operations?
What's the difference between System.String and System..StringBuilder in C#?
Why is static constructor called first?
State whether it is true to test a Web service you must create a windows application or Web application to consume this service or not?
Give an example of a directcast.
Why do we use readonly in c#?
Can we inherit abstract class in c#?
Why do we use dataset in c#?
Is c# easier than c++?
Why do we use interface in c#?
Is it possible to have a static indexer in c#? Allowed in c#.
What is c sharp language?