為什么我照著打運行一直顯示是我現(xiàn)在0歲
請輸入問答內(nèi)容...using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Kindergarten { ? ?class Program ? ?{ ? ? ? ?static void Main(string[] args) ? ? ? ?{ ? ? ? ? ? ?Child c1 = new Child("劉有才",Gender.男,3); ? ? ? ? ? ?Growth(c1); ? ? ? ? ? ?Console.WriteLine("我現(xiàn)在{0}歲了",c1.Age); ? ? ? ?} ? ? ? ? ? ? ? ?static void Growth(Child child) ? ? ? ?{ ? ? ? ? ? ?child.Age++; ? ? ? ? ? ?Console.WriteLine("噢!我又長大了一歲!"); ? ? ? ?} ? ?} ? }
2018-08-11
我直接復(fù)制你的代碼執(zhí)行的,沒有問題啊。。。
2019-06-27
百分百 Child? 類 屬性 里面加了判斷?
2018-09-30
我看你的代碼也沒問題啊