putting numbers in an array into arraylist
Posted
by
arash
on Stack Overflow
See other posts from Stack Overflow
or by arash
Published on 2010-12-28T08:42:30Z
Indexed on
2010/12/28
8:53 UTC
Read the original article
Hit count: 283
i have numbers that user enter in textBox3 and i converted them to an array nums now i want to put half of them in arraylist A and half of them in arraylist B how can i do that?thanks
string[] source = textBox3.Text.Split(',');
int[] nums = new int[source.Length];
for (int i = 0; i < source.Length; i++)
{
nums[i] = Convert.ToInt32(source[i]);
}
ArrayList A = new ArrayList();
ArrayList B = new ArrayList();
© Stack Overflow or respective owner