Method SetValue
| Edit this page View SourceSetValue(int, T)
Sets the value at the specified linear index.
Declaration
public void SetValue(int linearIndex, T value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | linearIndex | The flat 1D index within the buffer. |
| T | value | The value to store. |
SetValue(ReadOnlySpan<T>)
Sets the values of the buffer using a read-only span. Span length must match in bytes.
Declaration
public void SetValue(ReadOnlySpan<T> values)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<T> | values | A read-only span of values. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Thrown if lengths do not match. |