RAD Studio VCL Reference
TObject::ClassNameIs Method

Determines whether an object is of a specific type.

class function ClassNameIs(const Name: string): Boolean;
Boolean ClassNameIs(const string Name);

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!