| | |
Arrays help?
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Dec 2008
Posts: 14
Reputation:
Solved Threads: 0
i am using vb dot net 2003.
I want to store randomly generated numbers in an array. The Numbers are declared as integers. The amount of numbers generated will not be constants so i can not initialize the array before hand. However the numbers generated will be from 1 to 5000.
After the randomly generated numbers are generated i will ask the user to input a "number" , then i will check using a loop if the number stored in the above mentioned array (the one which holds the randomly generated numbers) matches the value input. i know i have to use a loop. But do notknow how this would be done.
i can not figure out how to do this please help. thank you.
I want to store randomly generated numbers in an array. The Numbers are declared as integers. The amount of numbers generated will not be constants so i can not initialize the array before hand. However the numbers generated will be from 1 to 5000.
After the randomly generated numbers are generated i will ask the user to input a "number" , then i will check using a loop if the number stored in the above mentioned array (the one which holds the randomly generated numbers) matches the value input. i know i have to use a loop. But do notknow how this would be done.
i can not figure out how to do this please help. thank you.
Look my friend I don't know how you don't know the size of array and you said you will generate some number, so tell me when you'll stop generating numbers? Any way I know you question is away from this.
Your question answer is
It'd work whatever you know the size or not and if you changed its size at runtime.
Hope I got more from you
best of luck
Your question answer is
vb.net Syntax (Toggle Plain Text)
For index As Integer = 1 To YourArray.Length 'Your search algorithm resides here Next
Hope I got more from you
best of luck BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
•
•
Join Date: Dec 2008
Posts: 14
Reputation:
Solved Threads: 0
•
•
•
•
Look my friend I don't know how you don't know the size of array and you said you will generate some number, so tell me when you'll stop generating numbers? Any way I know you question is away from this.
Your question answer is
It'd work whatever you know the size or not and if you changed its size at runtime.vb.net Syntax (Toggle Plain Text)
For index As Integer = 1 To YourArray.Length 'Your search algorithm resides here Next
Hope I got more from youbest of luck
please help thanks.
OK, show me to where you reached, post some code to know how can I do the next step.
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
![]() |
Similar Threads
- (reformatted) How to return Multi-Dimensional Arrays (C++)
- What relation does **indirection operator have with Multidimensional Arrays (C++)
- Arrays (C++)
- How to Return Multidimensional Arrays (C++)
- C file input/output 2D arrays. (C)
- passing arrays in visual basic (Visual Basic 4 / 5 / 6)
Other Threads in the VB.NET Forum
- Previous Thread: vb.net and compact framework?
- Next Thread: Visual Basic- need to make a field mandatory w/out a dropdown box
Views: 365 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for VB.NET
.net 2005 2008 access account application arithmetic array arrays basic bing button buttons c# center check checkbox code combobox component convert crystalreport data database databasesearch datagrid datagridview design designer dissertation dissertations dropdownlist excel file-dialog folder ftp generatetags google gridview hardcopy highlighting images inline insert installer intel internet listview mobile monitor ms net networking output passingparameters peertopeervideostreaming picturebox picturebox1 plugin port print printing problem problemwithinstallation project save searchbox searchvb.net select serial server soap sorting studio syntax table tcp text textbox time timer toolbox trim update updown user vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web wpf






