why do I get a compiler error in the following code stating: Cannot implicty convert type SpecialNode to T even though T must derive from NodeBase as I defined
Cannot implicty convert type SpecialNode to T
See my answer from a previous post
Using Generics to return a literal string or from Dictionary
but the answer is
return (T)MySpecialNode
Because even you do the if check the compiler does not so you have to recast to T