# GetSharedIndexBySourceIndex(int)

> Index of shared value associated with an element in the source buffer. For example, given source array: [A,A,A,B,B,C,C,A,B] shared values are: [A,B,C] Given the index 2 into the source array (A), the return value would be 0 (A in shared values).

## Definition

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

```csharp
public int GetSharedIndexBySourceIndex(int indexIntoSourceBuffer)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Index of source value

### Returns

| Type                                                       | Description                          |
| ---------------------------------------------------------- | ------------------------------------ |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | Index into the list of shared values |
