Click here to Skip to main content
15,867,308 members
Please Sign up or sign in to vote.
1.80/5 (3 votes)
Please do help me.
I need to get a user input from a text box and rearrange the string in alphabetical order and display it in a message box.
I need to do this in WINDOWS FORMS APPLICATION IN VISUAL C++ using VISUAL STUDIO 2010

Thanks in advance
Posted

1.First you should to convert your string into an array of char by using ToCharArray() method of the String class;

2.Then use Array.Sort() to sort the chars;

3.And finally convert back from array to string by using String constructor;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900