close
1. class 可以分為 Instance class(需要產生物件才可以使用其field or property) and
Static class(不需要產生物件直接使用class名稱即可使用field or property)。
2.static Property
使用 myClass.Name = "Melo";
即可指定這個class 的Name Property。
(注意此時我們設定的是此class的Property,而非這個class的物件之property)。
3. static class 中只能包含static fields or propertys,否則編譯不會過。
4.Static Method:
ex.
全站熱搜