J
jc
Hello.. C# noob here needing some clue on how to do this in C#.
I have a giant textbox that will contain data that looks like this.
===
Question; Answer1;Answer2; AnswerN...
Are you a US citizen; Yes; No
When was the last time visited a Doctor; Prior to 2000; Prior to 2005;
In the Last 3 months
==
Columns delimited by semicolons
Rows delimited by new line.
For each row. The first column is the question, subsiquent columns are
anwsers. A question can have an unlimted number of answers.
I need to execute this code (substituting the data) for every line,
but don't know how many answers a row might have.
StringCollection strQuestions = new StringCollection();
string strQuestion = "Question";
strQuestions.Add("Answer1);
strQuestions.Add("Answer2);
strQuestions.Add("AnswerN);
objSurvey.Fields.Add(strQuestion, SPFieldType.Choice,
true, false, strQuestions);
What's the best way to approach this?
Thank you for any help or information.
I have a giant textbox that will contain data that looks like this.
===
Question; Answer1;Answer2; AnswerN...
Are you a US citizen; Yes; No
When was the last time visited a Doctor; Prior to 2000; Prior to 2005;
In the Last 3 months
==
Columns delimited by semicolons
Rows delimited by new line.
For each row. The first column is the question, subsiquent columns are
anwsers. A question can have an unlimted number of answers.
I need to execute this code (substituting the data) for every line,
but don't know how many answers a row might have.
StringCollection strQuestions = new StringCollection();
string strQuestion = "Question";
strQuestions.Add("Answer1);
strQuestions.Add("Answer2);
strQuestions.Add("AnswerN);
objSurvey.Fields.Add(strQuestion, SPFieldType.Choice,
true, false, strQuestions);
What's the best way to approach this?
Thank you for any help or information.