Quote:
it didnt worked out
"it did not work" is one of the error reports we get quite often, and it's always completely useless - it tells us nothing about your problem other than "I have a problem" and we knew that because you are asking a question!
What did it do that you didn't expect, or not do that you did?
When did it do it?
Are there any error messages?
What did you do to make it do that?
What have you tried to do to find out why?
What were the results?
What help do you need?
These are all questions we need an answer to - or we can't help you at all!
At a guess, if you want multiple ID inputs, then your user needs to separate then with a specific character, such as a comma:
1,2,3
Then you can just use Split to break them up:
string[] parts = tbMultipleIDs.Text.Split(',');
ANd then convert them to integers in the usual way:
int[] Ids = new int[parts.Length];
int i = 0;
foreach (string s in parts)
{
int id;
if (!int.TryParse(s, out id))
{
... report bad number to user ...
return;
}
Ids[i++] = id;
}