473,320 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

how to insert values into arraylist in vb.net

10
hi, im using vb.net 2005
how can i add values to arraylist & how can i retreive those values into one variable or windowsdatagrid view
Nov 20 '07 #1
1 3500
dip_developer
648 Expert 512MB
hi, im using vb.net 2005
how can i add values to arraylist & how can i retreive those values into one variable or windowsdatagrid view
Adding values to arraylist :
---------------------------------------

Expand|Select|Wrap|Line Numbers
  1.  
  2. Dim myArrayList As New ArrayList()
  3.  
  4. myArrayList .Add("My")
  5. myArrayList .Add("Name")
  6. myArrayList .Add("Is")
  7. myArrayList .Add("harikap")
  8.  
Reading from arraylist :
------------------------------------

Expand|Select|Wrap|Line Numbers
  1.  
  2. Dim i As Integer
  3.  
  4. For i = 0 To myArrayList .Count - 1
  5. Console.WriteLine(CStr(myArrayList .Item(i)))
  6. Next
  7.  
Nov 20 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Zanzibar | last post by:
H In Delphi the Search method has Two return values. 1 Bool to indicate if it is found and 1 integer to return the possition If the bool was false, the index was the possition where the item...
5
by: Zeng | last post by:
Hello Everyone, Is there anything wrong with this block of code? ArrayList arr = new ArrayList( 33 ); for( int i = 0; i < 33; ++i ) { arr.Insert( i, new MyObject() ); }
3
by: Hai Nguyen | last post by:
Hi all I was attempting to insert multiple row by using a loop into a database.A table has 2 primary keys and one regular field (PR) (PR) ID Project Ans 1 2 a 1 ...
6
by: Sean | last post by:
HI There, I am making the transition from asp to asp .net, I am currenty writing an application that requires a bulk insert from a webform into SQL server, normally I would just create rows of...
0
by: Dave | last post by:
Hi all, I have a listbox that is complex bound by an arraylist. The problem is that when I delete an object from the arraylist, the listbox does not reflect those changes. I tried refreshing...
4
by: Jon Paal | last post by:
I am using a custom server control in my webpage which renders some html. while it creates the html, it develops an arraylist of values. Is there a way to capture the arraylist from the control...
3
by: Ryan Liu | last post by:
Hi, What does ArrayList.Synchronized really do for an ArrayList? Is that equal to add lock(this) for all its public methods and properties? Not just for Add()/Insert()/Remvoe()/Count, but also...
6
by: Pavel Maly | last post by:
Hi, how do I access values in an ArrayList which is a part of another ArrayList? I know I can define a class and then it is quite simple, but this is just an auxiliary application to compute some...
8
by: =?Utf-8?B?QkxVRVNUQVI=?= | last post by:
HELLO, I AM A NEW BII TO ASP,AND I NEED HELP ON THIS ISSUE. I HAVE A .ASP FORM WHICH IS ALREADY BUILT WITH 5 QUESTIONS AND 5 TEXTAREAS RESPECTIVELY.THESE 5 QUESTIONS ARE NOT FIX,THERE WILL BE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.