On 06/23/13 13:04, Lemonfiend wrote:
> void writeAll()
> {
> foreach(elem; array)
> elem.write();
> }
>
> void writeB()
> {
> // Only call .write on B's
> // How do I get the B's from the array of I's?
> }
void writeB()
{
foreach(elem; array)
if (auto b = cast(B)elem)
b.write();
}
artur