C 學習總結

2021-08-10 15:19:31 字數 631 閱讀 3994

函式 convert.toint32() 把使用者輸入的資料轉換為 int 資料型別,因為 console.readline() 只接受字串格式的資料。

字尾u 和 l 分別表示 unsigned 和 long。

\b退格鍵

\\\ 字元

[obsolete("don't use oldmethod, use newmethod instead", true)]老方法呼叫報錯,提示don't use oldmethod, use newmethod instead

// 宣告型別為 string 的 code 屬性

public string code

set}c#特性property

宣告了委託型別,委託物件必須使用 new 關鍵字來建立

引用的方法具有與委託相同的引數和返回型別

委託類似於其他一些語言中的函式指標概念

乙個**塊使用 unsafe 修飾符標記時,c# 允許在函式中使用指標變數

使用 tostring() 方法檢索儲存在指標變數所引用位置的資料

需要使用指標變數訪問陣列資料,使用 fixed 關鍵字來固定指標

通過stackalloc在堆疊上分配記憶體,因為在堆疊上分配的記憶體不受記憶體管理器管理,因此其相應的指標不需要固定

C 學習總結

using system using system.collections.generic using system.text namespace helloworld class fraction class program console.writeline sum private static...

C 學習總結( )

1 based code 是為了向後相容用的。2 mfc提供的由cdialog派生的類 derived dialog class purpose ccolordialog 選擇顏色 cfiledialog 選擇檔名以開啟或儲存 cfindreplacedialog 查詢或替換對話方塊 cfontdi...

C 學習總結

用一段 來表示的話就是這樣了 void main int date 1 while date 17 cout 第 這種教學方式,在讓自己增長知識的同時還考驗著乙個人對堅持做一件事的決心和毅力。相對於前者來說,我感覺在社會中後者的作用可能會更大吧。現在我發現部落格對我的吸引力更大了,當看到自己的十分用...