Let’s say you have a list of words in a file that is saved as a static resource in your app. Now you want to read each line and append it to a List. The solution is simple: you just use the ReadLine() method in a loop and Add() to a List of Strings.

List<String> RandomStrings = new List<String>();

StreamResourceInfo fileres =
Application.GetResourceStream(new Uri(“strings.txt”, UriKind.Relative));
using (System.IO.Stream isoFileStream = fileres.Stream) {
using (var fileReader = new System.IO.StreamReader(isoFileStream)) {
string line;
while ((line = isoFileReader.ReadLine()) != null) {
RandomStrings.Add(line);
}
}
}