So I'm trying to run the following:
PHP Code:
string[] lines = { "First line", "Second line", "Third line" };
Windows.ApplicationModel.Package package = Windows.ApplicationModel.Package.Current;
Windows.Storage.StorageFolder installedLocation = package.InstalledLocation;
string myDocPath = installedLocation.Path;
string fullPath = myDocPath + @"\WriteLines.txt";
using (StreamWriter outputFile = new StreamWriter(fullPath))
{
foreach (string line in lines)
outputFile.WriteLine(line);
}
But I get the error "cannot convert from string to system.IO.Stream", pointing to fullPath when I try to pass it on to the constructor for StreamWriter.
According to this there should be an overloaded constructor for it to create the object via a string:
https://msdn.microsoft.com/en-us/lib...v=vs.110).aspx
So why does it tell me it expects a Stream object? Am I missing something?