# operator !=(AssetKey, AssetKey)

> Compares two keys for inequality.

## Definition

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

```csharp
public static bool operator !=(AssetKey a, AssetKey b)
```

### Parameters

**** (\[AssetKey]\(/engine/6000.7/script-reference/unity/localization/providers/assetkey)): The first key.**** (\[AssetKey]\(/engine/6000.7/script-reference/unity/localization/providers/assetkey)): The second key.

### Returns

| Type                                                          | Description                                                       |
| ------------------------------------------------------------- | ----------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | `true` if the keys identify different assets; otherwise, `false`. |

### Remarks

The negation of [AssetKey.Equals](/engine/6000.7/script-reference/unity/localization/providers/assetkey/equals.md): the keys differ when their address, sub-asset name, or [AssetKey.Type](/engine/6000.7/script-reference/unity/localization/providers/assetkey/type.md) differ.

Distinguish two keys that share an address but differ by type.

### Examples

```csharp
using Unity.Localization.Providers;
using UnityEngine;

namespace Unity.Localization.Samples
{
    public class AssetKeyInequalityOperatorExample
    {
        public void Run()
        {
            var texture = new AssetKey("UI/Logo", typeof(Texture2D));
            var sprite = new AssetKey("UI/Logo", typeof(Sprite));

            Debug.Log(texture != sprite);   // True: same address, different type
        }
    }
}
```
