We have a handy dandy syntax for this: if (MyClassInt subclass = cast(MyClassInt)value) { writeln(subclass.value); }If it doesn't cast to said type (it will be null) that branch won't execute.
Hell yeah! It's works! Thank you!
We have a handy dandy syntax for this: if (MyClassInt subclass = cast(MyClassInt)value) { writeln(subclass.value); }If it doesn't cast to said type (it will be null) that branch won't execute.
Hell yeah! It's works! Thank you!