輸出結(jié)果問題
Student s1 = new Student("李白", 10, Gender.男);
? ? ? ? ? ? Student s2 = new Student("小妹", 9, Gender.女);
? ? ? ? ? ? Console.WriteLine(s1.Name, s1.Age, s1.Sex);
? ? ? ? ? ?Console.WriteLine(s2.Name,s2.Age,s2.Sex);
跟著老師的代碼寫的 ?基本一致 ? 編譯無錯(cuò)誤 ? 為什么 我的 輸出每次都只有輸出名字 ?其他的 ?性別和年齡 不會(huì)輸出,單獨(dú)輸出 都是可以的 比如Console.WriteLine(s1.Age,);可以輸出年齡 ?求告知 ?萬分感謝
2017-06-27
你好,
代碼輸出格式不對(duì),不是用逗號(hào),是用加號(hào)+
如果用逗號(hào)的話 ,只輸出第一個(gè)的值 ,就停止了,
2017-02-05
你把完整代碼粘上。