@Jessie.
I wasnt having a go, I was just pointing out that if you had used different names in the first place, it would have been more obvious that you had to cast, because the field in "C" wouldnt exist, as apposed to the program using the field in the base type.
When you first posted it, I had thought that your understanding was that you were only createing one field. As you have said other, then I believe you. Was just shocked that you understood it to that level, yet did realize that you needed to cast.
I do however think its a silly thing to do (duplicate names), as it gains you no memory, just makes it harder to see iif any future problem is one of allocation or casting.
I wasnt having a go, I was just pointing out that if you had used different names in the first place, it would have been more obvious that you had to cast, because the field in "C" wouldnt exist, as apposed to the program using the field in the base type.
When you first posted it, I had thought that your understanding was that you were only createing one field. As you have said other, then I believe you. Was just shocked that you understood it to that level, yet did realize that you needed to cast.
I do however think its a silly thing to do (duplicate names), as it gains you no memory, just makes it harder to see iif any future problem is one of allocation or casting.