C#中避免不必要装箱与拆箱的方法  

Methods of Avoiding Unnecessary Boxing and Unboxing in C#

在线阅读下载全文

作  者:涂刚[1] 

机构地区:[1]江苏财经职业技术学院,江苏淮安223003

出  处:《平顶山学院学报》2009年第5期120-125,共6页Journal of Pingdingshan University

基  金:基于WAP(Wireless Application Protocol)的移动图书管理系统的研究(CYK0833)

摘  要:装箱/拆箱操作是C#中较重要的操作,如果使用不当,开发出来的系统性能将受到较大影响.在具体分析了装箱/拆箱的原理后,通过对实际代码进行性能分析和MSIL反编译程序查看.exe程序的内部机理,提出了通过重载函数、接口方式和泛型来避免不必要的装箱/拆箱;对正在使用C#进行系统开发的人员将有一定的参考价值.Boxing/unboxing is a more important operation in C#. If it is improperly used in the system design process, the system performance will be greatly impacted. After analysing the principle of boxing/unboxing, the thesis proposes the miss of unnecessary boxing/unboxing by overloaded function, interface mode and generic by way of the code performance analysis and observing executable program' s structure by MSIL. This will have reference values for users of c#.

关 键 词:公共类型系统 值类型 引用类型 装箱 拆箱 

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

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

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