Einzelnen Beitrag anzeigen

Benutzerbild von DP News-Robot
DP News-Robot

Registriert seit: 4. Jun 2010
15.663 Beiträge
 
#1

Delphi: getting the name of the current unit

  Alt 28. Jan 2021, 06:10
If you have a class (like TMyClass) in the current unit, you can get the unit name as follows: inside a method of the class (either instance or class method): call UnitName*or UnitScope*to get the unit name outside a method of the class: call TMyClass.UnitName*or TMyClass.UnitScope Delphi added UnitName*[WayBack] and**Delphi XE2 added UnitScope*[Archive.is]. Their implementations […]

Weiterlesen...
  Mit Zitat antworten Zitat