Thanks Pavan Kumar Mark Answer if this fits the need
string Input = "ss bb za bd aa cx"; Input = Input.Replace(" ", ""); char[] In = Input.ToCharArray(); Array.Sort<char>(In); StringBuilder OutPut = new StringBuilder(); char Ou = In[0]; for (int i = 0; i < In.Length; i++) { if (In[i] != Ou ) // we should specify as array { OutPut.Append(" "); Ou = In[i + 1]; } } OutPut.Append(In); // we should put this one out of the loop otherwise it will repeat the output lblMeassage.Text = OutPut.ToString();
Thanks and Regards V.SaratChand Show difficulties that how difficult you are
Login to post response