I have a plist file which contains several array properties with each array containing 3 - 5 values. I'm attempting to read the plist file into a List. The class Questions contains 2 properties: a Question string, and a List Answers.
I've placed the plist file in my main app folder (same folder that contains AppDelegate.cs) and I've also tried it in the resources folder. I'm attempting to read the file into a variable first with the line:
_path = NSBundle.MainBundle.PathForResource("QuestionsList", "plist");
This is where I get stuck. I added a Console.WriteLine(string.Format ("Path - {0}", _path));
underneath to see if it was getting the correct path/file but all that would return would be "Path - " so it appears the _path variable is not being assigned the correct path.
Also, once I do get the proper path into the variable, how do I go about reading it into my List properly? I want the name of each Array property from the plist (e.g. "Question 1", "Question 2", etc.) to be read in as the Question string, and the contents of each array property to be read in as the List Answers.