I've been reading Albaharis' "C# 5.0 in A Nutshell" and I've encountered this in Generics section and it is said to be legal:
class Bar<T> where T : Bar<T> { ... }
And it meant nothing to me, although I've read the whole chapter carefully. I couldn't understand even a bit of it.
Can someone please explain it with some understandable naming, like:
class Person<T> where T : Person<T> { ... }
And a real-world application scenario where this usage is appropriate and useful?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…