Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Write code for palindrome?

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


Please Help Members By Posting Answers For Below Questions

What is a Command Object in C#?

1083


Can structs in c# have destructors?

1031


What does int32 mean in c#?

945


Is datetime value type c#?

921


Why singleton class is sealed?

986


How do I open the console window?

1082


Who introduced c#?

921


How to implement delegates in c#.net

1066


Can I use parseint?

950


What's the difference between system.string and system.text.stringbuilder classes?

1109


What is different between Boxing and Unboxing?

1070


If a method's return type is void, can you use a return keyword in the method?

929


What is a concrete class in c#?

1032


Okay, so an int is a value type, and a class is a reference type. How can int be derived from object?

984


What is the difference between // comments, /* */ comments and /// comments?

896