hi, i need help on to stored x and y coordinate in two dimensional array
i receive input from listbox or textbox and stored in array,
the data will be 40 points
really need help on it
thanks
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jean PaulPosted Nov 9, 2010, 6:58 AM
1) You can use an array like you mentioned:
int[,] array = new int[40,2];
array[0, 0]=100; //x
array[0, 1] = 200; //y
or
2) Use the Point struct and List for storing
IList
list.Add(new System.Drawing.Point(100, 200));