protected string name;. 這裡protected 的欄位可以被子類別繼承, private 則不行。 下面定義兩個public 的建構子(constructor) public Animal() { name = "動物"; } ...
確定! 回上一頁