Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Runtime.InteropServices.WindowsRuntime;
- using Windows.Foundation;
- using Windows.Foundation.Collections;
- using Windows.UI.Xaml;
- using Windows.UI.Xaml.Controls;
- using Windows.UI.Xaml.Controls.Primitives;
- using Windows.UI.Xaml.Data;
- using Windows.UI.Xaml.Input;
- using Windows.UI.Xaml.Media;
- using Windows.UI.Xaml.Navigation;
- using System.Threading.Tasks;
- using Windows.Storage;
- using System.Xml.Linq;
- namespace App1
- {
- /// <summary>
- /// それ自体で使用できる空白ページまたはフレーム内に移動できる空白ページ。
- /// </summary>
- public sealed partial class MainPage : Page
- {
- public MainPage()
- {
- this.InitializeComponent();
- }
- private async void btnRead_Click(object sender, RoutedEventArgs e)
- {
- var xd = await GetXdoc();
- lblMsg.Text = xd.ToString();
- }
- static async Task<XDocument> GetXdoc()
- {
- return await Task.Run(() => {
- StorageFolder appFolder = ApplicationData.Current.LocalFolder;
- string path = @"quiz.xml";
- return XDocument.Load(path);
- });
- }
- }
- }
Add Comment
Please, Sign In to add comment