var arrFiles = oDI.GetFiles("*.dll"); foreach (var fi in arrFiles) { var ass = Assembly.LoadFile(fi.FullName); var arrTypes = ass.GetTypes(); foreach (var type in arrTypes)
namespace ConsoleApplication1{ class Program { static void Main(string[] args) { /*迴圈語句*/ //for迴圈 int i,j; string x = "*"; string y=" "; for (i = 0; i <= 10; i++)
49. Understand the behavior of the new-handler.總結:第一,set_new_handler允許客戶指定一個函數,在記憶體配置無法獲得滿足時被調用。第二,Nothrow new是一個頗為局限的工具,因為它只適用於記憶體配置;後繼的建構函式調用還是可能拋出異常。50. Understand when it makes sense to replace new and delete.替換編譯器提供的operator new或operator
5.Know what functions C++ silently writes and calls.總結:編譯器可以暗自為class建立default建構函式、copy建構函式、copy assginment操作符,以及解構函式。這些函數都是public的,並且是inline的。6.Explicitly disallow the use of compiler-generated functions you to not
Item 19: 視 class design(類設計)為 type design(類型設計)作者:Scott Meyers譯者:fatalerror99 (iTePub's Nirvana)發布:http://blog.csdn.net/fatalerror99/在 C++ 中,就像其它 object-oriented programming languages(物件導向程式設計語言),通過定義一個新 class(類)來定義一個新 type(類型)。作為一個 C++
Item 1: 將 C++ 視為 federation of languages(語言聯合體)作者:Scott Meyers譯者:fatalerror99 (iTePub's Nirvana)發布:http://blog.csdn.net/fatalerror99/最初,C++ 僅僅是在 C 的基礎上附加了一些 object-oriented(物件導向)的特性。C++ 最初的名稱—— "C with Classes" 就非常直觀地表現了這一點。作為一個語言的成熟過程,C++
Item 39: 謹慎使用 private inheritance(私人繼承)作者:Scott Meyers譯者:fatalerror99 (iTePub's Nirvana)發布:http://blog.csdn.net/fatalerror99/Item 32 論述了 C++ 將 public inheritance(公有繼承)視為一個 is-a 關係。當給定一個 hierarchy(繼承體系),其中有一個 class Student 從一個 class Person