TCodeUnit.UseUnit Method
Adds a unit to the uses clause, avoiding duplicates.
Remarks
If the unit is already in the interface uses clause, it is not added again.
If AAddToImplementation is False and the unit is in the implementation uses clause, it is moved to the interface uses clause.
Syntax
Unit: Bcl.Code.MetaClasses
procedure TCodeUnit.UseUnit(const AUnitName: string; AAddToImplementation: Boolean = False);
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| const | AUnitName | string | The name of the unit to add. |
| AAddToImplementation | Boolean | Optional: Default value is False If True, adds to the implementation uses clause; otherwise adds to the interface uses clause. |