Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public List<string> options1 = new List<string>();
- public struct question
- {
- public string text;
- public List<string> options;
- }
- public List<question> questions;
- string line;
- var reader = new System.IO.StreamReader("questions.txt");
- question ques = new question();
- while (reader.ReadLine()!=null)
- {
- line = reader.ReadLine();
- if (line[0]!='+' && line[0]!='-')
- {
- ques.text = line;
- }
- else
- {
- ques.options.Add(line);
- }
- if (line=="@")
- {
- questions.Add(ques);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement