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 does async mean in c#?

927


Explain static class members.

990


Please explain the basic string operations used in c#?

911


How to find the current application file path while runtime?

926


Can enum have methods c#?

833


How to get the sum of last 3 items in a list using lambda expressions?

887


What is an int c#?

806


Can property be private in c#?

826


If you define a user defined data type by using the class keyword, is it a value type or reference type?

832


Can we override interface methods in c#?

804


what is the index value of the first element in an array?

877


How does it work?

875


Why delegates are type safe in c#?

832


Is class reference type c#?

875


Can we have static indexer in c#?

850