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
Explain states of a thread in c#?
What is global asax in c#?
what is partial assembly reference
Explain types of comment in c# with examples
Differentiate between sqlclient oledb and providers?
What are strings in c#?
Why cannot you specify the accessibility modifier for methods inside the interface?
Why do we need to override in c#?
How do you create dlls in .NET
what is IFormatable
What is verbatim string literal in c#?
Can we inherit class that contains only one private constructor?
What is default value of decimal c#?
Which control cannot be placed in mdi?
How do you mark a method obsolete?