# DROP CLASS Delete Class Definition

> Source: https://manual.pvxplus.com/directives/drop-class

## Format

**DROP CLASS** *class$*

***Where:***

|  |  |
| --- | --- |
| *class$* | Name of the class to be deleted. String expression. |

## Description

The **DROP CLASS** directive is used in **[Object Oriented Programming](https://manual.pvxplus.com/pxplus-user-guide/object-oriented-pxplus/introduction)** to delete a class definition and all related information. Once a class definition is established, then it may not be changed but it can be deleted and recreated using **DROP CLASS**. Only class definitions that have no references to them may be deleted. This means that no class can be deleted when:

- Any object exists which refers to this class.
- Any other class exists which refers to this class by its **LIKE** clause.

Any attempt to delete a class that has a reference to it will return an Error #50: Class in use or already defined. All class definitions will be deleted when a **START** directive is issued. Either **DROP CLASS** or **DELETE CLASS** can be used to delete a class definition.

## See Also

**[DEF CLASS Define Object Class](https://manual.pvxplus.com/directives/def-class)**  
**[DROP OBJECT Delete Object](https://manual.pvxplus.com/directives/drop-object)**  
**[FUNCTION Declare Object Method](https://manual.pvxplus.com/directives/function)**  
**[LIKE Inherit Properties](https://manual.pvxplus.com/directives/like)**  
**[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/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)**
