System.TObject.ClassNameIs

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

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

C++

__classmethod bool __fastcall ClassNameIs(const UnicodeString Name);

Properties

Type Visibility Source Unit Parent
function public
System.pas
systobj.h
System TObject

Description

Determines whether an object is of a specific type.

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 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.

See Also