Click here to Skip to main content
13,094,983 members (81,452 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I want to take Array Input (more then 1 number) with a single textbox. and i want to show it on a list box. can any buddy help me.
Posted 27-Nov-12 23:34pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You have to use a input separator (e.g. blank) and then split according the input text, e.g.
 // suppose textBox.Text = "12 1 24 35";
 string [] sna = textBox.Text.Split(new char[] {' '});
 foreach( string sn in sna )
Mathlab 28-Nov-12 18:22pm
you could have just dont a .toList<string>()
Muhamad Faizan Khan 3-Dec-12 7:32am
what does split do?
CPallini 3-Dec-12 8:01am
That's well explained in the relative documentation:

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.170813.1 | Last Updated 28 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100