I would like to know how to achieve this task in C#. For example;
I got 10 questions from which 3 is to be displayed to user for them to
type the answer. How can i make the program generate 3 questions that
are non-repeating(unique) assuming the 10 questions that we are
starting with is unique.
I am using the logic in a asp.net application, and the same set of questions are allowed to be displayed the next time page is refreshed, so that’s no problem for me.
Use a List for your Question instances, and select one at random (by index). Then remove it from the List and repeat. Something like so;