# operator !=(TypeIndex, TypeIndex)

> TypeIndex instances are equal if they refer to the same component type instance.

## Definition

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

```csharp
public static bool operator !=(TypeIndex lhs, TypeIndex rhs)
```

### Parameters

**** (\[TypeIndex]\(/engine/7000.0/script-reference/unity/entities/typeindex)): [TypeIndex](/engine/7000.0/script-reference/unity/entities/typeindex.md) on left side of the equality expression.**** (\[TypeIndex]\(/engine/7000.0/script-reference/unity/entities/typeindex)): [TypeIndex](/engine/7000.0/script-reference/unity/entities/typeindex.md) on right side of the equality expression.

### Returns

| Type                                                          | Description                          |
| ------------------------------------------------------------- | ------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True, if both TypeIndices are equal. |

### Remarks

Note that two [TypeIndex](/engine/7000.0/script-reference/unity/entities/typeindex.md) for the same Component Type may not always be equal. For example, a type inheriting from [IComponentData](/engine/7000.0/script-reference/unity/entities/icomponentdata.md) could be used as a Chunk Component in one Archetype but not in another. If those two TypeIndices were compared they would not match even though they are for the same System.Type.
