Variant confusion

Peter Sommerfeld noreply at rubrica.at
Mon Mar 11 12:04:02 PDT 2013


cal <callumenator at gmail.com> wrote:

> To get the held type of a Variant, use .type():
>
> if(value.type() == typeid(Map))
>     writeln("value == map");
> else if(value.type() == typeid(Value))
>     writeln("value == Value"); // Is still Value!
>
> prints map.

Thanks cal, that will help! Seems I'm currently (?)
a bit blind...

Peter


More information about the Digitalmars-d-learn mailing list