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

C#

 
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 
This is one part of text file:
["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"]

I want to get text from text file between [ and ?
I tried this commands but it doesn't work:

C#
List<string> questions = File.ReadLines(path)
                                       .Where(x => x.StartsWith("[") &&
                                                   x.EndsWith("?"))
                                       .ToList();

            foreach (string x in questions)
            {
                listBox1.Items.Add(x);
            }

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 
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 
GeneralRe: C# Specified cast is not valid Pin
harold aptroot22-Dec-16 22:39
harold aptroot22-Dec-16 22:39 
GeneralRe: C# Specified cast is not valid Pin
Richard MacCutchan22-Dec-16 22:54
mveRichard MacCutchan22-Dec-16 22:54 

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.