|
how do i create an arraylist in an array.. whereby i am getting the info using barcode and rfid (using windows ce application)storing it in the array and after sending it to the server(database) cant use datagrid and stuff as needed to combine with java application...
<Added>
using VB..
|
|
|
"how do i create an arraylist in an array"
What do you mean? You create ArrayLists by declaring them (sorry, I code in C#):
ArrayList myArrayList = new ArrayList() |
|
Or do you want to create an array of ArrayLists? Like so:
ArrayList[] myList = new ArrayList[5]; |
|
You can also create ArrayLists of arrays, ArrayLists of ArrayLists, an multi-dimensional arrays. Let me know if you need more help or if I misunderstood the question.
Please support CodeToad by clicking one of the ads. If you found my post helpful, please visit my site and thank me by clicking one of MY ads.
|
|
|
|
|
oh bcos, i have multiple info of the barcode and there is no limit to how many, so i hav to declare it in the arraylist first, after getting the size of the arraylist, den to apply the size and info to the array
|
|
|
I'm sorry, I didn't understand any of that. Are you asking another question or clarifying your previous question? Did I answer your previous question? I'll help if I can, but need you to frame your question in clear, precise language.
You add items to an ArrayList with the "Add" method.
You retrieve the capacity of an ArrayList with the "Capacity" property.
You can retreive the actual count of an ArrayList with the "Count" property.
You can create a string array with a count equal to the actual number of elements in an ArrayList by declaring:
ArrayList myArrayList = new ArrayList();
// code to add elements to the ArrayList
string[] = new string[myArrayList.count];
You can copy the contents of one collection to another, using a "for" loop.
Please support CodeToad by clicking one of the ads. If you found my post helpful, please visit my site and thank me by clicking one of MY ads.
|
|
|
|
|
|
|
|
|
|