Equals
Compares two NativeArray<T> instances.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Method
- Namespace: Unity.Collections
- Assembly: UnityEngine.CoreModule
Equals(NativeArray<T>)
Compares two NativeArray<T> instances.
public bool Equals(NativeArray<T> other)
Parameters
The NativeArray to compare against.
Returns
Type | Description |
|---|---|
| bool | True if the two NativeArray instances are the same, false otherwise. |
Remarks
Two NativeArray<T> instances are considered the same if they point to the same underlying memory buffer, and have the same length.
Equals(Object)
Compares a NativeArray<T> instance and an object.
public override bool Equals(object obj)
Parameters
The object to compare against.
Returns
Type | Description |
|---|---|
| bool | True if the NativeArray and the object are the same, false otherwise. |
Remarks
A NativeArray and an object are considered the same if they point to the same underlying memory buffer, and have the same length.