Class References

Jared Miller none at example.com
Wed Nov 20 15:10:55 PST 2013


On Wednesday, 20 November 2013 at 23:06:37 UTC, Jared Miller 
wrote:

> Foo getObj(ClassNames name) {
> 	// without cast, it converts to the enum member name.
> 	return cast(Foo)Object.factory(cast(string)name);
> }

Oops, never mind - you don't need the "cast(string)" there.


More information about the Digitalmars-d-learn mailing list