Why this works in C# (generic class and self-reference)?
问题 I have class X<T> : Base { //For exemple: static T something(); } And I can have class A : X <A> { } To logically have something like this: class A : Base { static A something(); } This works and works well. But in my comprehension, it's kind of self-reference (A is the children of X, while X doesn't exists before A...), which is breaks the foundation of computer science, so I want to know what's wrong with my comprehension?? 回答1: It's totally fine. You can do similar without generics too: