codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Creating Arraylist in an array  jervel at 01:19 on Tuesday, November 23, 2004
 

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..

  Re: Creating Arraylist in an array  tgreer at 01:44 on Tuesday, November 23, 2004
 

"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.





  Re: Creating Arraylist in an array  jervel at 01:48 on Tuesday, November 23, 2004
 

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

  Re: Creating Arraylist in an array  tgreer at 02:49 on Tuesday, November 23, 2004
 

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.









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
• SoftIce Driver Suite 3.0.1
• metrowerks codewarrior 9.0
• Mapinfo.Professional.v7.0
• GardenGraphics DynaSCAPE Professional 3.02
• Embroidery Great Notions 2004 part01-74
• EFI_BEST_COLORPROOF_V5.0
• AViD.SOFTiMAGE.XSi.V4.2.CD1-NNiSO
• AUTOFX.PHOTOGRAPHIC.EDGES.6.0.CD1
• 0 STI.SASSPro.v2.0.0.2 working full


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2014