![]() using (DataWriter textWriter = new DataWriter(textStream)).using (IRandomAccessStream textStream = await textFile.OpenAsync(FileAccessMode.ReadWrite)).StorageFile textFile = await localFolder.CreateFileAsync(filename, CreationCollisionOption.ReplaceExisting).public static async Task WriteTextFile( string filename, string contents).// Write a text file to the app’s local folder.Here’s the list of tasks demonstrated in the Basic Storage Recipes sample: Download the sample to see working examples of the programming tasks described in this blog post. The Windows Phone SDK documentation team recently published the Basic Storage Recipes sample. For more info, see Asynchronous Programming with Async and Await (C# and Visual Basic). Many of the methods in these namespaces are asynchronous methods that require you to use the async and await keywords. ![]() You can see all the methods and properties of these new namespaces here: When you switch to the Windows.Storage APIs, it’ll be easier to port your Windows Phone app to the Windows Store, and easier to upgrade your app to future versions of the Windows Phone operating system. ![]() You can use them in place of the APIs from the System.IO.IsolatedStorage namespace that might be familiar to a Windows Phone 7 developer. These APIs are in the Windows.Storage and namespaces. Windows Phone 8 introduces new APIs for file handling that are convergent with the APIs in Windows Store apps. ![]() This blog post was authored by Douglas Laudenschlager, a Senior Content Developer on the Windows Phone Developer Content team. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |