On Thursday, 27 March 2014 at 06:16:04 UTC, Jeremy DeHaan wrote:
As the title says, I was wondering if there was a way to get the classes name at runtime, but not its fully qualified name. I want JUST the name of the class only.
So for a given class Foo, you want to extract the string "Foo"? class Foo { unittest() { assert(typeof(this).stringof == "Foo"); } }If that gets evaluated in runtime I guess you could store it in an enum.