int mynumber = int32.fromstring(s); 報錯:f:my documentsvisual studio projectsexam3_5class1.cs(28): “int”并不包含對“fromstring”的定義 (該問題已解決:改成 int mynumber = int32.parse(s); 或 int mynumber = convert.toint32(s); )
stream s = (new file("linkedlist.bin")).(filemode.open); 報錯: f:my documentsvisual studio projectsexam2_16class1.cs(51): 重載“open”方法未獲取“1”參數
2,看預定義的時候有個地方看不懂了, 書上說: 預定義聲明語句#define后面不能直接跟實際代碼,但可以直接接其他的預處理語句,例如下面的語句是正確的: #define a #if a #define b #endif namespace exam3_6 { using system; #if b public class class 1{} #endif }
但下面的語句是錯誤的:
#define a namespace exam3_6 { #define b #if b public class class1{} #endif }
在編譯器編譯了一下,在#define b這一行報錯說: f:my documentsvisual studio projectsexam3_6class1.cs(4): 不能在文件的第一個標記之后,定義或取消定義預處理器符號