On Wed, Feb 03, 2016 at 11:45:15PM +0000, Enjoys Math via Digitalmars-d-learn wrote: > On Wednesday, 3 February 2016 at 23:43:45 UTC, Enjoys Math wrote: > >I am making a method called: > > > >@property string debugIDString() { > >in { > > assert(super.toHash() == this.toHash()); > >} body { > > > >} > > body { // is currently: > return to!string(this.toHash()); > } > > and is returning a base10 string, so how would I return a hex string so I > can compare numbers displayed to the debugger addresses in visual D?
@property string debugIDString() { import std.format; return format("%x", this.toHash()); } T -- Study gravitation, it's a field with a lot of potential.