string yourword = txtyourword.Text; try { Array.Sort(yourword); foreach (string str in yourword) { } } catch { }
string str = txtyourword.Text; char[] arr = str.ToCharArray(); Array.Sort(arr); Response.Write(arr);
string str = txtyourword.Text; char[] arr = str.OrderBy(s => s.ToString()).ToArray(); Console.WriteLine(arr);
char [] yourword = txtyourword.Text.ToArray(); try { Array.Sort(yourword); foreach (var str in yourword) { // Console.WriteLine(str); } // Console.ReadLine(); } catch { }
string s = "Mukesh"; string[] myArray = new string[s.Length]; for (int i = 0; i < s.Length; i++) { myArray[i] = s[i].ToString(); } Array.Sort(myArray);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)