Click here to Skip to main content
15,894,291 members
Home / Discussions / C#
   

C#

 
GeneralRe: Proper way to determine the colors of controls? Pin
arnold_w5-Jan-10 2:04
arnold_w5-Jan-10 2:04 
GeneralRe: Proper way to determine the colors of controls? Pin
Saksida Bojan5-Jan-10 4:41
Saksida Bojan5-Jan-10 4:41 
GeneralRe: Proper way to determine the colors of controls? Pin
arnold_w5-Jan-10 21:30
arnold_w5-Jan-10 21:30 
QuestionAdd-in is not executing. Pin
SRKSHOME4-Jan-10 23:24
SRKSHOME4-Jan-10 23:24 
Questionc# windows application Pin
naghoumeh144-Jan-10 22:52
naghoumeh144-Jan-10 22:52 
AnswerRe: c# windows application Pin
OriginalGriff4-Jan-10 23:08
mveOriginalGriff4-Jan-10 23:08 
GeneralRe: c# windows application Pin
naghoumeh144-Jan-10 23:21
naghoumeh144-Jan-10 23:21 
GeneralRe: c# windows application Pin
OriginalGriff4-Jan-10 23:38
mveOriginalGriff4-Jan-10 23:38 
You will need to keep a record of which questions have been picked allready, and generate a new random number. Or (more advanced):
When you read in your XML file, create a class that holds a question, and its possible answers. Store all these questions in a List<myClass> (which is easy)
List<myClass> questions = new List<myClass>;
myClass question = new myClass(ReadQuestionFromXML());
questions.Add(question);

Now when you want a new question, use Random with the number of questions left as the upper limit, then remove the question from the list and display it.

This is difficult to explain, as I don't want to give you the answer - you won't learn anything if I do - but it honestly is not as difficult as you think! Just do it in stages:

Create the XML
Read the XML
Create the list
Use the list.

You can probably also break each of these stages down into smaller tasks, and implement them and test before moving on to the next.

All those who believe in psycho kinesis, raise my hand.

GeneralRe: c# windows application Pin
naghoumeh144-Jan-10 23:46
naghoumeh144-Jan-10 23:46 
GeneralRe: c# windows application Pin
OriginalGriff5-Jan-10 0:00
mveOriginalGriff5-Jan-10 0:00 
AnswerRe: c# windows application Pin
Programm3r4-Jan-10 23:12
Programm3r4-Jan-10 23:12 
AnswerRe: c# windows application Pin
Isaac Gordon6-Jan-10 1:25
Isaac Gordon6-Jan-10 1:25 
QuestionException context in C# Pin
Antoine Jaussoin4-Jan-10 22:51
Antoine Jaussoin4-Jan-10 22:51 
AnswerRe: Exception context in C# Pin
Nicholas Butler4-Jan-10 23:20
sitebuilderNicholas Butler4-Jan-10 23:20 
GeneralRe: Exception context in C# Pin
Antoine Jaussoin5-Jan-10 0:10
Antoine Jaussoin5-Jan-10 0:10 
GeneralRe: Exception context in C# Pin
Nicholas Butler5-Jan-10 0:30
sitebuilderNicholas Butler5-Jan-10 0:30 
GeneralRe: Exception context in C# Pin
Antoine Jaussoin5-Jan-10 1:21
Antoine Jaussoin5-Jan-10 1:21 
GeneralRe: Exception context in C# Pin
Nicholas Butler5-Jan-10 1:35
sitebuilderNicholas Butler5-Jan-10 1:35 
GeneralRe: Exception context in C# Pin
Luc Pattyn5-Jan-10 2:26
sitebuilderLuc Pattyn5-Jan-10 2:26 
QuestionEnumerate eventlog sources Pin
Sunil G4-Jan-10 22:02
Sunil G4-Jan-10 22:02 
AnswerRe: Enumerate eventlog sources Pin
Programm3r4-Jan-10 23:19
Programm3r4-Jan-10 23:19 
AnswerRe: Enumerate eventlog sources Pin
Programm3r4-Jan-10 23:31
Programm3r4-Jan-10 23:31 
GeneralRe: Enumerate eventlog sources Pin
Sunil G5-Jan-10 1:31
Sunil G5-Jan-10 1:31 
QuestionC# Avr Pin
jojoba20104-Jan-10 21:30
jojoba20104-Jan-10 21:30 
AnswerRe: C# Avr Pin
OriginalGriff4-Jan-10 21:56
mveOriginalGriff4-Jan-10 21:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.