# IsDescendantOf(TypeIndex, TypeIndex)

> Used to determine if a component inherits from another component type

## Definition

* **Type:** Method
* **Namespace:** [Unity.Entities](/engine/7000.0/script-reference/unity/entities.md)
* **Assembly:** UnityEngine.EntitiesModule

```csharp
public static bool IsDescendantOf(TypeIndex typeIndex, TypeIndex baseTypeIndex)
```

### Parameters

**** (\[TypeIndex]\(/engine/7000.0/script-reference/unity/entities/typeindex)): Child type to test if it inherits from baseTypeIndex**** (\[TypeIndex]\(/engine/7000.0/script-reference/unity/entities/typeindex)): Parent type typeIndex may have inherited from

### Returns

| Type                                                          | Description                                                 |
| ------------------------------------------------------------- | ----------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns if child is a subclass of the parent component type |
