|
-
Jan 13th, 2020, 01:33 PM
#5
Re: Randomising (an array) without repeats VB.net
Arrays are arrays. With an array (It’s easier with a generic List) of FileInfo, you have two options for avoiding selecting duplicates. You can remove them from the collection, or you can add them to a second collection that you use as an exclude list. On selecting a random FileInfo, you can check it doesn’t exist in your exclude list, if not use it and add it to the exclude list, else pick another random FileInfo and try again...
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
Tags for this Thread
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
|
Click Here to Expand Forum to Full Width
|