Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I know : indicates inheritance in C#;

but what does it mean when the same identifier is on either side?

Eg

class GameObject : GameObject {
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
170 views
Welcome To Ask or Share your Answers For Others

1 Answer

It does not work, because Visual Studio will throw a 'cyclic dependency' error, because, when you think about it, GameObject inherits from GameObject which inherits from GameObject which inherits from... In other words, this is impossible, and so means nothing (except, like Neil mentioned in the comments, a compiler error).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...