Method CopyFromReadOnlyCollection
CopyFromReadOnlyCollection<T>(IReadOnlyCollection<T>, NativeArray<T>)
Copies the contents of source into the NativeArray destination.
The lengths of both collections must match.
Declaration
public static void CopyFromReadOnlyCollection<T>(IReadOnlyCollection<T> source, NativeArray<T> destination) where T : struct
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyCollection<T> | source | The |
| NativeArray<T> | destination | The |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the |
Remarks
Prefer IReadOnlyList over IReadOnlyCollection for copy performance where possible.
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Thrown when there is a mismatch between |