Click here to Skip to main content
15,887,430 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# Read random line Pin
Garth J Lancaster26-Mar-17 13:50
professionalGarth J Lancaster26-Mar-17 13:50 
AnswerRe: C# Read random line Pin
OriginalGriff26-Mar-17 21:37
mveOriginalGriff26-Mar-17 21:37 
GeneralRe: C# Read random line Pin
Pavlex426-Mar-17 21:52
Pavlex426-Mar-17 21:52 
GeneralRe: C# Read random line Pin
OriginalGriff26-Mar-17 22:12
mveOriginalGriff26-Mar-17 22:12 
GeneralRe: C# Read random line Pin
Pavlex426-Mar-17 23:41
Pavlex426-Mar-17 23:41 
GeneralRe: C# Read random line Pin
Pete O'Hanlon26-Mar-17 23:45
mvePete O'Hanlon26-Mar-17 23:45 
GeneralRe: C# Read random line Pin
Pavlex427-Mar-17 0:03
Pavlex427-Mar-17 0:03 
GeneralRe: C# Read random line Pin
Pete O'Hanlon27-Mar-17 0:07
mvePete O'Hanlon27-Mar-17 0:07 
Sigh. Let me simplify this for you.

Griff has suggested that you break your original list down (the ones that originally started with * being your question). These then have a number of answers stored as a series of pipe delimited fields. That's your parent/child relationship there.

The lines originally marked with * will now be the first entry in this pipe delimited list.

You know how many entries you have in this list, so you use this as the upper bound of the Random number.

That's it - the code is trivial. To make things more random, don't forget to seed the Random when you instantiate it. Read the documentation for details on how to do this.
This space for rent

AnswerRe: C# Read random line Pin
Luc Pattyn27-Mar-17 11:15
sitebuilderLuc Pattyn27-Mar-17 11:15 
QuestionHow can I create multi-threads application in which each thread have its own WebDriver to do its tasks? Pin
khanhsk26-Mar-17 4:29
khanhsk26-Mar-17 4:29 
AnswerRe: How can I create multi-threads application in which each thread have its own WebDriver to do its tasks? Pin
Dave Kreskowiak26-Mar-17 4:49
mveDave Kreskowiak26-Mar-17 4:49 
GeneralRe: How can I create multi-threads application in which each thread have its own WebDriver to do its tasks? Pin
khanhsk26-Mar-17 23:49
khanhsk26-Mar-17 23:49 
QuestionVisual Studio 2017 problems Pin
zequion25-Mar-17 23:30
professionalzequion25-Mar-17 23:30 
AnswerRe: Visual Studio 2017 problems Pin
Michael_Davies26-Mar-17 0:11
Michael_Davies26-Mar-17 0:11 
AnswerRe: Visual Studio 2017 problems Pin
Richard MacCutchan26-Mar-17 1:37
mveRichard MacCutchan26-Mar-17 1:37 
Questionadd members to a group Pin
Member 1299778224-Mar-17 18:25
Member 1299778224-Mar-17 18:25 
AnswerRe: add members to a group Pin
Richard MacCutchan24-Mar-17 22:59
mveRichard MacCutchan24-Mar-17 22:59 
QuestionMy Downloader Tutorial Using C# and Visual Studio Pin
Member 1306314324-Mar-17 7:31
Member 1306314324-Mar-17 7:31 
AnswerRe: My Downloader Tutorial Using C# and Visual Studio Pin
Pete O'Hanlon24-Mar-17 9:17
mvePete O'Hanlon24-Mar-17 9:17 
RantRe: My Downloader Tutorial Using C# and Visual Studio Pin
Ravi Bhavnani25-Mar-17 9:49
professionalRavi Bhavnani25-Mar-17 9:49 
GeneralRe: My Downloader Tutorial Using C# and Visual Studio Pin
Member 1306314325-Mar-17 15:40
Member 1306314325-Mar-17 15:40 
GeneralRe: My Downloader Tutorial Using C# and Visual Studio Pin
Pete O'Hanlon26-Mar-17 7:25
mvePete O'Hanlon26-Mar-17 7:25 
QuestionVisual studio 2015 addins to edit yaml files Pin
GABII24-Mar-17 4:29
GABII24-Mar-17 4:29 
AnswerRe: Visual studio 2015 addins to edit yaml files Pin
Pete O'Hanlon24-Mar-17 4:44
mvePete O'Hanlon24-Mar-17 4:44 
AnswerRe: Visual studio 2015 addins to edit yaml files Pin
Richard Deeming24-Mar-17 5:50
mveRichard Deeming24-Mar-17 5:50 

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.