I was able to pass a string in as a parameter successfully:
PHP Code:
var path = @"C:\Temp\aaron.txt";
using (var sw = new StreamWriter(path))
{
//..
}
Which assembly is Windows.ApplicationModel.Package located in?
It's also worth mentioning that you can get rid of that loop and replace it with a call to WriteAllLines() if all you're doing is saving the contents of your array to a file
PHP Code:
var path = @"C:\Temp\aaron.txt";
string[] lines = { "First line", "Second line", "Third line" };
System.IO.File.WriteAllLines(path, lines);