# LIKE Inherit Properties

> Source: https://manual.pvxplus.com/directives/like

## Format

**LIKE** *"otherclass", "otherclass", ...*

***Where:***

|  |  |
| --- | --- |
| *otherclass* | Name of a class to inherit properties from. |

## Description

The **LIKE** directive is used in **[Object Oriented Programming](https://manual.pvxplus.com/pxplus-user-guide/object-oriented-pxplus/introduction)** (OOP) to inherit the properties from one or more other classes.

All properties and methods are inherited from the specified classes. When multiple occurrences of the same property/function are found within the inheritance, the first class declared in the **LIKE** directive takes precedence.

## See Also

**[DEF CLASS Define Object Class](https://manual.pvxplus.com/directives/def-class)**  
**[DROP CLASS Delete Class Definition](https://manual.pvxplus.com/directives/drop-class)**  
**[DROP OBJECT Delete Object](https://manual.pvxplus.com/directives/drop-object)**  
**[FUNCTION Declare Object Method](https://manual.pvxplus.com/directives/function)**  
**[LOAD CLASS Pre-Load Class Definition](https://manual.pvxplus.com/directives/load-class)**  
**[LOCAL Designation of Local Data](https://manual.pvxplus.com/directives/local)**  
**[PROGRAM Create or Assign Program File](https://manual.pvxplus.com/directives/program)**  
**[PROPERTY Declare Object Properties](https://manual.pvxplus.com/directives/property)**  
**[RENAME CLASS Change Name of Class](https://manual.pvxplus.com/directives/rename-class)**  
**[STATIC Add Local Properties at Runtime](https://manual.pvxplus.com/directives/static)**  
**[NEW( ) Create New Object](https://manual.pvxplus.com/functions/new)**  
**[REF( ) Control Reference Count](https://manual.pvxplus.com/functions/ref)**

## Example

```
def class "Company"
function Delete()
remove (fileno,key=COMP_ID$)
return 1
end def

def class "Client"
function Delete()
if AMT_OWING<>0 \
     then return 0
remove (fileno,key=CUST_ID$)
return 1
end def

def class "Dealer"
like "Client","Company"
end def
```

The Dealer class of objects would use the "Client" 'Delete() method since it was declared first.
