异步操作编译器应移至下一条语句 [英] Asynchronous operation compiler should be move to next statement

查看:75
本文介绍了异步操作编译器应移至下一条语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

海,

我有一个像下面的程序.

Hai,

I have one program like following.

int a=10;
int b=20;
Method(); 
int c=30;


在这里,我称一个方法名称为Method().此方法需要一些时间才能完成此操作.但我不想等到完成手术.编译器应移至下一个int c = 30的语句;同时我也不想使用线程概念.如何在C#中做.请帮助我.


Here I am calling one method name is Method(). This method is taking some time to complete this operation. But I dont want wait until finish the operation. Compiler should be move to next statement of int c=30; At the same time i dont want use Thread concept also. How to do in c#. Please help me.

推荐答案

可以看看
.NET委托:.NET环境中的异步方法调用 [异步调用同步方法 [
You can look at
.NET Delegates: Making Asynchronous Method Calls in the .NET Environment[^]
Calling Synchronous Methods Asynchronously[^]


这篇关于异步操作编译器应移至下一条语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆