Write code for palindrome?

Answer Posted / rajender

private bool CheckPalindrome(string myString)

{

int First;

int Second;

First = 0;

Second = myString.Length - 1;

while (First < Second)

{

if(myString.Substring(First,1) == myString.Substring
(Second,1))

{

First ++;

Second --;

}else{

return false;

}

}

return true;

}

Is This Answer Correct ?    17 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you access a hidden base class method in the derived class?

505


Why do we use Design Pattern in C#?

576


What is xor operator in c#?

519


Explain the three services model (three-tier application). Presentation (ui), business (logic and underlying code) and data (from storage or other sources).

487


Explain About ADO and its objects

575






What is type cast in C#?

565


What is datetime minvalue in c#?

575


What is continue in c#?

514


What is reference c#?

570


State whether it is true to test a Web service you must create a windows application or Web application to consume this service or not?

485


What is the use of table aliases?

496


What are the problem with .NET generics?

557


What are different types of classes in c#?

486


What is application object in c#?

508


What is strong data type in c#?

485