-
create an array of unique numbers vb.net
i am trying to create an array that consists of 15 random but unique numbers. any help is appreciated. i am using vb.net 2005.
thanks!
Last edited by wartech; 08-14-2006 at 10:42 AM.
-
Which part do you need help with:
- Declaring a 15-element array?
- Generating a random number?
- Ensuring that the number is not already in the array?
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
-
ensuring that the number is not already in the array.
-
I would probably use a Hashtable (System.Collections namespace). You can use the .Contains method to determine whether a value is already present and the .CopyTo method to copy it to an array when you have 15 unique values.
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
-
thanks phil i will work on this.
Similar Threads
-
By kanakatam in forum Java
Replies: 1
Last Post: 05-31-2006, 02:14 AM
-
By kanakatam in forum Java
Replies: 2
Last Post: 04-15-2005, 09:06 PM
-
Replies: 1
Last Post: 12-06-2002, 10:06 AM
-
By Lee Dodd in forum VB Classic
Replies: 1
Last Post: 05-16-2002, 02:34 PM
-
By Chris Kinsman in forum .NET
Replies: 3
Last Post: 08-02-2000, 01:06 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks