write program in C# for palindrome? (aug 2009)
write program in C3 for generating below output?(aug 2009)
#
# #
# # #
# # # #

Answer Posted / elan

string sName = "elan";
char[] aName = sName.ToCharArray();
Array.Reverse(aName);
string sReversedName = new string(aName);
if (sName == sReversedName)
{
MessageBox.Show("it is palindrome");
}
else
{
MessageBox.Show("it is not palindrome");
}

Is This Answer Correct ?    25 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we use static class in c#?

566


What happens if a static constructor throws an exception?

577


Which is faster array or arraylist in c#?

559


What is difference between ienumerable and enumerable in c#?

542


What is Dependency of Injection?

614






What is default method in c#?

595


Can class inherit from struct c#?

617


Which class does the remote object has to inherit?

703


hi my question is about understanding a text the user entered to a site , so i want to analyse that text looking for some specific items such as "honda" "shoffere" etc.. so if this site could help or could tell me where to go with such question ,i wonder. thanks

1675


Which is executed if an exception has not occurred?

598


What is garbage collector and where should you use in .NET?

590


How can you write a class to restrict that only one object of this class can be created (Singleton class)?

606


Explain the difference between .net and c#?

580


How many bytes is a char c#?

565


How do you pass reference parameters in c#?

526