Answer Posted / kautilya
bool CheckPalindrom(string MyString)
{
string strChar1 = "";
string strChar2 = "";
for (int i = 0; i < ((MyString.Length - 1) / 2);
i++)
{
strChar1 = MyString.Substring(i, 1);
strChar2 = MyString.Substring((MyString.Length -
(i+1)), 1);
if (strChar1 != strChar2)
return false;
}
return true;
}
Is This Answer Correct ? | 11 Yes | 7 No |
Post New Answer View All Answers
How can I create image pieces/sub image?
Can delegates be used as callbacks?
Explain about Destructor method?
What are controls in c#?
What is console programming language?
What is boxing? Explain its functionality?
What is inline function in c#?
How many constructors can a class have c#?
What is “using” statement in c#?
How is a string immutable?
Explain the difference between arraylist and array and in c#?
what are the differences between a class and structure
Why singleton class is sealed in c#?
How do you declare an arraylist?
Which class comes after the SortedList class?