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

Is array value type in c#?

582


Which programming language is best for desktop applications?

452


How do I create a .exe file?

482


What is difference between value and reference types in C#.NET

513


Can we overload indexer in c#?

479






In object oriented programming, how would you describe encapsulation in c#?

537


What operator means?

485


What language do desktop applications use?

476


What is the diff between System.String and System.Text.StringBuilder classes?

525


What does using do in c#?

515


Which is better python or c#?

458


What is main thread in c#?

499


What are the Types of instancing properties and explain each. Explain the difference between multiuse,singleuse and globalmultiuse and which is default

554


What is the advantage of generics in c#?

502


Can abstract classes be final?

495