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 array and types of array in c#?
What is the difference between console application and windows application?
Is equal in c#?
What are the delegates in c#?
What is the property of class?
How to add controls dynamically to the form using c#.net.
How the versioning applies to Assemblies or can you explain version numbers?
Why dictionary is faster than list?
Can a class have more than 1 destructor?
Why do we need singleton class in c#?
Describe the difference between inline and code behind - which is best?
Which property do we set on a Combo Box to display data on it prior to setting the DataSource ?
Are string objects mutable or immutable?
Which constructor is called first in c#?
what is c# command?