# implicit operator TableEntryReference

> Converts key text into a name-based entry reference.

## Definition

* **Type:** Operator
* **Namespace:** [Unity.Localization](/engine/6000.7/script-reference/unity/localization.md)
* **Assembly:** UnityEngine.LocalizationRuntimeModule

## implicit operator TableEntryReference(TableEntryReferenc)

Converts key text into a name-based entry reference.

```csharp
public static implicit operator TableEntryReference(string key)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The key text of the entry to reference.

### Returns

| Type                                                                                             | Description                                               |
| ------------------------------------------------------------------------------------------------ | --------------------------------------------------------- |
| [TableEntryReference](/engine/6000.7/script-reference/unity/localization/tableentryreference.md) | An entry reference that identifies the entry by key text. |

### Remarks

Lets you assign a string wherever a [TableEntryReference](/engine/6000.7/script-reference/unity/localization/tableentryreference.md) is expected. The result has a [TableEntryReference.ReferenceType](/engine/6000.7/script-reference/unity/localization/tableentryreference/referencetype.md) of `Name`. An empty or null string produces an empty reference.

Reference an entry by key text through the implicit conversion.

### Examples

```csharp
using Unity.Localization;

namespace Unity.Localization.Samples
{
    public class TableEntryReferenceFromKeyExample
    {
        public TableEntryReference Run() => "Menu/Start";
    }
}
```

## implicit operator TableEntryReference(TableEntryReferenc)

Converts a key id into an id-based entry reference.

```csharp
public static implicit operator TableEntryReference(long keyId)
```

### Parameters

**** (\[long]\(https\://learn.microsoft.com/dotnet/api/system.int64)): The stable key id of the entry to reference.

### Returns

| Type                                                                                             | Description                                             |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------- |
| [TableEntryReference](/engine/6000.7/script-reference/unity/localization/tableentryreference.md) | An entry reference that identifies the entry by key id. |

### Remarks

Lets you assign a long wherever a [TableEntryReference](/engine/6000.7/script-reference/unity/localization/tableentryreference.md) is expected. The result has a [TableEntryReference.ReferenceType](/engine/6000.7/script-reference/unity/localization/tableentryreference/referencetype.md) of `Id`. Key ids are stable across key renames.

Reference an entry by key id through the implicit conversion.

### Examples

```csharp
using Unity.Localization;

namespace Unity.Localization.Samples
{
    public class TableEntryReferenceFromKeyIdExample
    {
        public TableEntryReference Run() => 12345L;
    }
}
```
