get classname in static member

bauss jj_1337 at live.dk
Wed Mar 28 10:12:34 UTC 2018


On Wednesday, 28 March 2018 at 09:44:35 UTC, number wrote:
> And could somebody explain to me why 'typeid(this).stringof' is 
> returning 'typeid(this)'?

stringof will return a string equivalent to the expression or 
symbol's representation, not its definition.

Meaning:

(212 + 221).stringof == "212 + 221"

(new Foo).stringof == "new Foo"

etc.


More information about the Digitalmars-d-learn mailing list