hi i m making a window application in which i want to make a program of ascending or descending the numbers.
in console it is quite easy, but in window application it will create a problem.
means what i want is when i enter some numbers in textbox like 23, 5, 7, 987, 4567,....and when i click on button so it will give me a sorted list in another textbox.
can anyone tell me how can i do it in C# window application.
kindly give me code, if possible
Loading

Kirtan PatelRank #292 · 8.6K reputationPosted Aug 8, 2009, 3:48 AM EDT
Here is Code for What you want to Do
Dont Forget to Mark "Do you Like Answer" it will give me some credit
private void button1_Click(object sender, EventArgs e) { string str = textBox1.Text; string[] numarray = str.Split(','); int[] intaary = new int[numarray.Length]; int i=0; foreach (string numb in numarray) { intaary[i] = int.Parse(numb); i++; } Array.Sort(intaary); foreach (int x in intaary) { listBox1.Items.Add(x); } }