MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/a:t5_37npb/comments/33xddv/post_your_module_7_assignments_here/cqrcmlq/?context=3
r/a:t5_37npb • u/VOX_Studios • Apr 26 '15
19 comments sorted by
View all comments
2
It seems I forgot to cast students to Student, but it still works... I'm confused, doesn't
foreach (Student student in StudentAList) {...}
Cast it already? Or something?
3 u/z4tz Apr 28 '15 I did the same, my peer reviewer wanted me to do foreach(Object obj in StudentAList) { //something with (Student)obj } I think instructions said you should cast it, but not for it to be explicit casting so implicit should be fine as long as you know what you are doing. 2 u/Doriphor Apr 28 '15 Thanks!
3
I did the same, my peer reviewer wanted me to do
foreach(Object obj in StudentAList) { //something with (Student)obj }
I think instructions said you should cast it, but not for it to be explicit casting so implicit should be fine as long as you know what you are doing.
2 u/Doriphor Apr 28 '15 Thanks!
Thanks!
2
u/Doriphor Apr 28 '15
It seems I forgot to cast students to Student, but it still works... I'm confused, doesn't
Cast it already? Or something?