许明会的计算机技术主页

Language:C,C++,.NET Framework(C#)
Thinking:Design Pattern,Algorithm,WPF,Windows Internals
Database:SQLServer,Oracle,MySQL,PostSQL
IT:MCITP,Exchange,Lync,Virtualization,CCNP

导航

2013年5月10日

reference and value type

摘要: ///<summary>///referencetypeisallocateonHEAP,///theassignmentstatementjustsetapinttotheobject.///thereferenceobjectmemorycollectiononappexit!///</summary>usingSystem;usingSystem.Collections.Generic;///<summary>///classisreferencetype;structisvaluetype///</summary>class/*struc 阅读全文

posted @ 2013-05-10 11:40 许明会 阅读(311) 评论(0) 推荐(0) 编辑

参数修饰符 params、 out、ref

摘要: ///<summary>///参数修饰符params、out、ref///</summary>usingSystem;namespaceConDemo{classMainClass{staticdoubleAverage(paramsdouble[]values){doubleaverage=0;foreach(variteminvalues){average+=item;}average=average/values.Length;returnaverage;}publicstaticvoidAdd(intx,inty,outintans){ans=x+y;}stat 阅读全文

posted @ 2013-05-10 11:36 许明会 阅读(258) 评论(0) 推荐(0) 编辑