# GetFieldOffset(FieldInfo)

> Returns the offset of the field relative struct or class it is contained in.

## Definition

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

```csharp
public static int GetFieldOffset(FieldInfo field)
```

### Parameters

**** (\[FieldInfo]\(https\://learn.microsoft.com/dotnet/api/system.reflection.fieldinfo)):&#x20;

### Returns

| Type                                                       | Description |
| ---------------------------------------------------------- | ----------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) |             |
