我无法在wp7应用程序的文本文件中编写文件,我该怎么办?
这是我的代码
Dim isolatedStorage As IsolatedStorageFile = IsolatedStorageFile.GetUserStoreForApplication
Dim isoStream As IsolatedStorageFileStream = New IsolatedStorageFileStream("TextFile1.txt", FileMode.Append, isolatedStorage)
Dim streamwriter As StreamWriter = New StreamWriter(isoStream)
streamwriter.WriteLine("sample")
streamwriter.Close()
我也尝试将它放在Using语句中,但它现在仍然在文本文件中写入
Dim isolatedStorage As IsolatedStorageFile = IsolatedStorageFile.GetUserStoreForApplication
Using isoStream As IsolatedStorageFileStream = New IsolatedStorageFileStream("/TextFile1.txt", FileMode.Append, isolatedStorage)
Using streamwriter As StreamWriter = New StreamWriter(isoStream)
streamwriter.WriteLine("PreMenu.xaml")
streamwriter.Close()
End Using
End Using
没有错误,但它没有在textfile中写文本,我该怎么办?