RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TClassWrapper.ClassNameIs Method

Determines whether an object is of a specific type.

Pascal
function ClassNameIs(const AClassName: string): Boolean;
C++
__fastcall Boolean ClassNameIs(const AnsiString AClassName);

System::TObject::ClassNameIs determines whether an object instance or class reference has a class name that matches a specified string. This is useful to query objects across modules or shared libraries.

Note: In C++ code, call System::TObject::ClassNameIs as a method to compare an object's class name. Use the global static function to compare the class name from a metaclass object.
 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!