getting type of object
Bill Baxter
dnewsgroup at billbaxter.com
Sun Nov 11 15:15:41 PST 2007
0ffh wrote:
> Bill Baxter wrote:
>> 0ffh wrote:
>>>
>>> May I "if (theInstance.classinfo==TheClass.classinfo)"?
>>>
>>> Seems to work...
>>
>> Does the comment about Typeinfo and Polymorphism help you at all?
>> http://www.prowiki.org/wiki4d/wiki.cgi?DocComments/Phobos/Object
>
> I'll take that as a "yes"... =)
> I was mainly concerned here if using the classinfo member counts
> as a hackish OMGWhatHaveYouGoneAndDoneNow??? or if it's okay to.
>
> Thanks, Frank
That sounds ok. If you want to see hackish uses of classinfo go visit
the source code for std.boxer.
--bb
More information about the Digitalmars-d-learn
mailing list