What is recommended way to perform async tasks in WPF?

后端 未结 4 1397
心在旅途
心在旅途 2021-01-18 12:52

Are there any standard tools, or recommended approaches for async tasks execution?

UPD I understand, how to use threads. I only need to know the recommended WPF way

4条回答
  •  耶瑟儿~
    2021-01-18 13:52

    depends what you are trying to do async. e.g. calling a WCF service I'd use the build-in way, with the Completed pattern that does the marshalling for you. Normal Background work I'd use the BackgroundWorker as you again don't need to worry about the marshalling.

提交回复
热议问题