宣告為readonly 的屬性(property) 可在建構子(constructor) 中作設定,在建構子以外的地方進行設定會發生編譯錯誤。 舉例如下 class Demo { readonly string a; ...
確定! 回上一頁