async3 Progress with Async/Await MainWindow.xaml MainWindow.xaml.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Window.. 2022. 8. 15. Async & Sync 비동기 프로그래밍 Async & Sync 비동기 프로그래밍 using System; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; namespace AsyncAwait { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { // case 1 //label1.Text = BigLongImportantMethod("John"); // case 2 : Task //Task.Factory.StartNew(() => BigLongImportant.. 2022. 6. 22. 비동기처리 main() { printGreeting('World'); printGreeting('Dart'); printGreeting('Flutter'); print('step 1'); print('step 2'); print('step 3'); print('end'); } Future printGreeting(String s) async { var greetingString = await getGreeting(s); print(greetingString); } getGreeting(String s) { return 'Hello $s !!'; } step 1 step 2 step 3 end Hello World !! Hello Dart !! Hello Flutter !! printGreeting() 처리 절차 1.. 2022. 6. 20. 이전 1 다음