委托调用方式分析  

Delegate Invocation Analysis

在线阅读下载全文

作  者:文戈[1] 雷英[1] 

机构地区:[1]中山火炬职业技术学院信息工程系,广东中山528400

出  处:《电脑编程技巧与维护》2014年第6期9-11,共3页Computer Programming Skills & Maintenance

摘  要:委托是一种特殊的类,它将方法当作另一个方法的参数来进行传递,C#的事件、多线程等都是建立在委托机制的基础上。分析了在C#下委托的调用方式,同步调用容易理解,比较简单,但是容易引发阻塞,而异步调用比较抽象,但是能避免阻塞。通过实例,详细地分析了同步方式、基于IAsyncResult异步方式和基于事件的异步方式的差异,分析了网络编程下TCP传输的模式选择。A delegate is a special class that method as a parameter to be passed to another method, C # events, multithreading, etc. are based on trust mechanism. This paper analyzes the invocation of delegate in C #, the synchronous call is easy to understand, relatively simple, but easily lead to obstruction, while an asynchronous call more abstract, but to avoid the obstruction, by example, a detailed analysis of the synchronous mode, based IAsyncResult asynchronous mode and differences in event-based asynchronous mode, the final analysis of TCP transport mode selection under networ k programming.

关 键 词:同步方式 异步方式 多线程 委托 事件 

分 类 号:TP311.1[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象