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
Can you mark static constructor with access modifiers?
What is the difference between static class and abstract class in c#?
What is eager and lazy loading in c#?
Why we need get set property in c#?
What is dll in vb.net?
Can an int be negative c#?
What is private static in c#?
what optimizations does the c# compiler perform when you use the /optimize+ compiler option?
What is private class in c#?
How do I declare a pure virtual function in c#?
What is entity framework c#?
When would you use generics in your code c#?
Is predicate a functional interface?
What does an indexer do?
What are variables in c#?