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 is a Command Object in C#?
Can structs in c# have destructors?
What does int32 mean in c#?
Is datetime value type c#?
Why singleton class is sealed?
How do I open the console window?
Who introduced c#?
How to implement delegates in c#.net
Can I use parseint?
What's the difference between system.string and system.text.stringbuilder classes?
What is different between Boxing and Unboxing?
If a method's return type is void, can you use a return keyword in the method?
What is a concrete class in c#?
Okay, so an int is a value type, and a class is a reference type. How can int be derived from object?
What is the difference between // comments, /* */ comments and /// comments?