Click here to Skip to main content
15,921,279 members
Home / Discussions / C#
   

C#

 
QuestionThe programming webcam with Visual Studio standard library ? Pin
Member 245846725-Dec-16 19:42
Member 245846725-Dec-16 19:42 
AnswerRe: The programming webcam with Visual Studio standard library ? Pin
Richard MacCutchan25-Dec-16 20:38
mveRichard MacCutchan25-Dec-16 20:38 
GeneralRe: The programming webcam with Visual Studio standard library ? Pin
Member 245846728-Dec-16 15:51
Member 245846728-Dec-16 15:51 
QuestionC# Database Question and Answers Connect Pin
Pavlex425-Dec-16 3:36
Pavlex425-Dec-16 3:36 
AnswerRe: C# Database Question and Answers Connect Pin
Richard Andrew x6425-Dec-16 5:24
professionalRichard Andrew x6425-Dec-16 5:24 
GeneralRe: C# Database Question and Answers Connect Pin
Pavlex425-Dec-16 7:02
Pavlex425-Dec-16 7:02 
GeneralRe: C# Database Question and Answers Connect Pin
Pete O'Hanlon25-Dec-16 9:57
mvePete O'Hanlon25-Dec-16 9:57 
GeneralRe: C# Database Question and Answers Connect Pin
Pavlex426-Dec-16 7:39
Pavlex426-Dec-16 7:39 
GeneralRe: C# Database Question and Answers Connect Pin
Pete O'Hanlon27-Dec-16 22:24
mvePete O'Hanlon27-Dec-16 22:24 
QuestionC# Read from text file Pin
Pavlex423-Dec-16 21:16
Pavlex423-Dec-16 21:16 
AnswerRe: C# Read from text file Pin
Michael_Davies23-Dec-16 21:29
Michael_Davies23-Dec-16 21:29 
AnswerRe: C# Read from text file Pin
OriginalGriff23-Dec-16 21:34
mveOriginalGriff23-Dec-16 21:34 
GeneralRe: C# Read from text file Pin
Pavlex423-Dec-16 21:40
Pavlex423-Dec-16 21:40 
AnswerRe: C# Read from text file Pin
Midi_Mick23-Dec-16 21:41
professionalMidi_Mick23-Dec-16 21:41 
GeneralRe: C# Read from text file Pin
Pavlex423-Dec-16 21:53
Pavlex423-Dec-16 21:53 
It's working:

C#
List<string> questions = File.ReadLines(path)
                                       .Select(x => x.Split(new char[] { '[', '?' }, StringSplitOptions.RemoveEmptyEntries)[0]).ToList();
            foreach (var x in questions)
            {
                listBox2.Items.Add(x);
            }


How to take separatly: ,2,"Sicilija","Korzika","Sardinija","Kapri"
In first listbox to put answers: 2,1,1,1
In second listbox to put chioce1: Sicilija","travama","Germanik","Japanski običaj" and same for other three choices?

["Koje ostrvo od Italije razdvaja Ligursko more.?",2,"Sicilija","Korzika","Sardinija","Kapri"]
["Agrostologija je nauka o ?",1,"travama","tabletama","konjima","zvezdama"]
["Sin rimskog cara Klaudija i Mesaline zvao se:",2,"Germanik","Britanik","Italik","Hispanik"]
["Šta je ofuro",1,"Japanski običaj","Kineske patike","Otkrivanje","Nemački izraz"]
["Bombardon je:",1,"muzički instrument","veliki top","vrsta aviona","vrsta slatkiša"]
["Koji filozof je rekao \"Sve teče\"?",2,"Pitagora","Heraklit","Aristotel","Sokrat"]
GeneralRe: C# Read from text file Pin
Midi_Mick23-Dec-16 22:09
professionalMidi_Mick23-Dec-16 22:09 
GeneralRe: C# Read from text file Pin
OriginalGriff23-Dec-16 22:56
mveOriginalGriff23-Dec-16 22:56 
GeneralRe: C# Read from text file Pin
Dave Kreskowiak24-Dec-16 4:38
mveDave Kreskowiak24-Dec-16 4:38 
AnswerRe: C# Read from text file Pin
Gerry Schmitz26-Dec-16 5:42
mveGerry Schmitz26-Dec-16 5:42 
QuestionC# Specified cast is not valid Pin
Pavlex422-Dec-16 20:48
Pavlex422-Dec-16 20:48 
AnswerRe: C# Specified cast is not valid Pin
Richard MacCutchan22-Dec-16 21:23
mveRichard MacCutchan22-Dec-16 21:23 
GeneralRe: C# Specified cast is not valid Pin
Pavlex422-Dec-16 21:33
Pavlex422-Dec-16 21:33 
GeneralRe: C# Specified cast is not valid Pin
Richard MacCutchan22-Dec-16 22:09
mveRichard MacCutchan22-Dec-16 22:09 
GeneralRe: C# Specified cast is not valid Pin
harold aptroot22-Dec-16 22:26
harold aptroot22-Dec-16 22:26 
GeneralRe: C# Specified cast is not valid Pin
Richard MacCutchan22-Dec-16 22:33
mveRichard MacCutchan22-Dec-16 22:33 

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.