Hm... would be a nice idiom to implement generically in D. Like a type switch.-Steve
That is what I would prefer, but I tried: writeln(to!(typeof(bars[1]))(bars[1]).val);to see if I could access the "DERIVED" (thanks) class type but even though bars[1] is initialized as a new Foos its type is still marked as Bar. So the question is, how do you find the derived class type when presented with only the super class?