Skip to content

Instantly share code, notes, and snippets.

@aetos382 aetos382/wpfeap.cs
Created Sep 16, 2015

What would you like to do?
private void button_Click(object sender, RoutedEventArgs e)
// ここは UI スレッドで実行される
Debug.WriteLine("button_Click : {0}", Thread.CurrentThread.ManagedThreadId);
var client = new WebClient();
client.Encoding = Encoding.UTF8;
client.DownloadStringCompleted += this.OnDownloadStringCompleted;
client.DownloadStringAsync(new Uri(""));
private void OnDownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
// ここも UI スレッドで実行されている
Debug.WriteLine("OnGetResponseCompleted : {0}", Thread.CurrentThread.ManagedThreadId);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.