Click here to Skip to main content
15,887,083 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
help me !
I'm working on a test program.
I still scrambling algorithms understand questions in a question bank, if people know the code for your application.
Posted

Are you just trying to get a random question? If so, a fairly simplistic algorithm is to use Random functionality to allocate the questions that are being asked in a random order.

A simple way of doing this is to allocate each question a number, and then use Random to get the appropriate one, adding it to a hash until all the questions have been chosen (the hash being used to guarantee you aren't attempting to add the same question in more than once).
 
Share this answer
 
VB
Sorry, Becaues ... I speak English very poor, I'm not English, I'm VietNamese :D, so I don't understand a lot what did you write?

I understand, I know statement radom() in C#,but I don't use.
If you have Demo or algorithms, can you post on the site ?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900