| | |
Address arrays via a for next loop
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: May 2009
Posts: 7
Reputation:
Solved Threads: 0
HI, I am sure that this has been asked before, but I can't seem to find the answer, so apologies for that.
I have 5 arrays, imaginatively named, array1 array2 etc. I want to operate on them via a for next loop. The pseudo code would look like this I guess :
How would I code that so that it works please?
Thanks for all and any help.
I have 5 arrays, imaginatively named, array1 array2 etc. I want to operate on them via a for next loop. The pseudo code would look like this I guess :
VB.NET Syntax (Toggle Plain Text)
dim token as integer = 'something' dim array1 as integer {1,2,3,4,5} dim array2 as ineger {1,2,3,4,5} etc for rest of arrays for i as integer = 1 to 5 if array(i,token) = 'something' then perform calculation end if next i
Thanks for all and any help.
Hi, I do not really understand what is your goal with this code, first of all this line does not seem right to me.
dim token as integer = 'something'
but anyway i think what you want is this.
Regards
dim token as integer = 'something'
but anyway i think what you want is this.
Dim token As Integer = 3
Dim Array1(,) As Integer = {{1, 2, 3, 4, 5}, {1, 2, 3, 4, 5}}
For i As Integer = 0 To 1
For a As Integer = 0 To 4
If Array1(i, a) = token Then
TextBox1.Text += "Should Find Number 3 two times"
End If
Next a
Next iRegards
If your already resolved your issue, flag it as solved.
José Bisonó
José Bisonó
![]() |
Similar Threads
- Simple 2D Arrays problem (Java)
- can someone help me with this problem with arrays? (VB.NET)
- Comparing items in arrays (Perl)
- Trouble with arrays (C++)
- displaying arrays (C++)
- VB6 - Look up email address from outlook address book? (Visual Basic 4 / 5 / 6)
- Arrays and for loops (C++)
- Storing dynamic form values in Arrays for display & insert (PHP)
- Can arrays be sent to functions in C? (C)
- only a couple of hours to go... (C++)
Other Threads in the VB.NET Forum
- Previous Thread: Vb[2008] Populating combo box from textfile (over 45,000 lines)
- Next Thread: Using a text in a textbox for a file name?
Views: 396 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for VB.NET
"crystal .net .net2005 30minutes 2005 2008 access application arithmetic array basic binary bing button buttons c# center check code combobox component connectionstring convert crystalreport data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dll dropdownlist error excel file-dialog folder ftp google hardcopy highlighting image images inline listview login math mobile ms navigate net networking opacity output peertopeervideostreaming picturebox picturebox1 plugin port print printing problem problemwithinstallation project reports" save savedialog searchbox serial server soap sorting sql string syntax tcp text textbox timer toolbox trim updown upload usercontrol vb vb.net vb.netcode vb.nettoolboxvisualbasic2008sidebar vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web wpf





