# SliceConvert<U>()

> Reinterprets a NativeSlice with a different data type (type punning).

## Definition

* **Type:** Method
* **Namespace:** [Unity.Collections](/engine/6000.7/script-reference/unity/collections.md)
* **Assembly:** UnityEngine.ManagedKernelModule

## SliceConvert\<T>()

```csharp
public NativeSlice<U> SliceConvert<U>() where U : struct
```

### Returns

| Type                                                                                 | Description                                                                                                                                                     |
| ------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [NativeSlice\<T>](/engine/6000.7/script-reference/unity/collections/nativeslice1.md) | A new [NativeSlice\<T>](/engine/6000.7/script-reference/unity/collections/nativeslice1.md) that views the same memory, but is reinterpreted as the target type. |
