# operator !=(NavQueryBuffer, NavQueryBuffer)

> Checks whether two NavQueryBuffer values refer to different underlying pathfinding buffers.

## Definition

* **Type:** Operator
* **Namespace:** [Unity.AI.Navigation.LowLevel](/engine/6000.5/script-reference/unity/ai/navigation/lowlevel.md)
* **Assembly:** UnityEngine.AIModule

```csharp
public static bool operator !=(NavQueryBuffer left, NavQueryBuffer right)
```

### Parameters

**** (\[NavQueryBuffer]\(/engine/6000.5/script-reference/unity/ai/navigation/lowlevel/navquerybuffer)): The first NavQueryBuffer to compare.**** (\[NavQueryBuffer]\(/engine/6000.5/script-reference/unity/ai/navigation/lowlevel/navquerybuffer)): The second NavQueryBuffer to compare.

### Returns

| Type                                                          | Description                                                                                |
| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | `true` if the two NavQueryBuffer values point to different allocations, `false` otherwise. |

### Remarks

This operator is a syntactic shortcut equivalent to negating the result of [NavQueryBuffer.Equals](/engine/6000.5/script-reference/unity/ai/navigation/lowlevel/navquerybuffer/equals.md). Use it inside expressions where the `!=` syntax is more concise than an explicit method call. Two buffers created by separate constructor calls are always considered different.

### Examples

```csharp
using Unity.Collections;
using UnityEngine;
using Unity.AI.Navigation.LowLevel;

public class NavQueryBufferNotEqualOperatorExample : MonoBehaviour
{
    void Start()
    {
        using NavWorld world = NavWorld.GetDefaultWorld();
        NavQueryBuffer one = new NavQueryBuffer(world, Allocator.Persistent, 1024);
        NavQueryBuffer two = new NavQueryBuffer(world, Allocator.Persistent, 1024);

        if (one != two)
            Debug.Log("Two separately constructed buffers never share an allocation.");

        one.Dispose();
        two.Dispose();
    }
}
```
