typeid of surrounding class from a static function?
J Arrizza
cppgent0 at gmail.com
Sun Nov 6 05:34:33 PST 2011
Hi,
I'm trying to get the name of the surrounding class from within a static
method of the class:
import std.stdio;
void main(string[] args)
{
auto o = new SomeClass();
o.Run();
SomeClass.StaticRun();
}
class SomeClass
{
public void Run()
{
writeln("In Class non-static: ", typeid(typeof(this)));
}
public static void StaticRun()
{
writeln("In Class static: ", typeid(typeof(??)));
}
}
What do I use for "??" above.
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20111106/baf3ceea/attachment.html>
More information about the Digitalmars-d
mailing list