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
What does async mean in c#?
Explain static class members.
Please explain the basic string operations used in c#?
How to find the current application file path while runtime?
Can enum have methods c#?
How to get the sum of last 3 items in a list using lambda expressions?
What is an int c#?
Can property be private in c#?
If you define a user defined data type by using the class keyword, is it a value type or reference type?
Can we override interface methods in c#?
what is the index value of the first element in an array?
How does it work?
Why delegates are type safe in c#?
Is class reference type c#?
Can we have static indexer in c#?