# EnumToInt<T>(T)

> Gets the integer representation of an enum value without boxing.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Collections.LowLevel.Unsafe](/engine/6000.5/script-reference/unity/collections/lowlevel/unsafe.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public static int EnumToInt<T>(T enumValue) where T : struct, IConvertible
```

### Parameters

**** (T): Enum value to convert.

### Returns

| Type                                                       | Description                                           |
| ---------------------------------------------------------- | ----------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | Returns the integer representation of the enum value. |
