Struct NativeReference<T>
ネイティブ参照
Inherited Members
Namespace: CriWare.InteropHelpers
Assembly: CriWare.CriBase.dll
Syntax
public struct NativeReference<T> where T : unmanaged
Type Parameters
| Name | Description |
|---|---|
| T | 参照先の型 |
Methods
AsSpan(int)
Spanへの変換
Declaration
public Span<T> AsSpan(int length)
Parameters
| Type | Name | Description |
|---|---|---|
| int | length | Spanの長さ |
Returns
| Type | Description |
|---|---|
| Span<T> | 参照先を表すSpan |
Exceptions
| Type | Condition |
|---|---|
| NullReferenceException |
GetRefValue()
参照の取得
Declaration
[Obsolete]
public ref T GetRefValue()
Returns
| Type | Description |
|---|---|
| T | 値への参照 |
Exceptions
| Type | Condition |
|---|---|
| NullReferenceException |
GetValue()
参照先の値の取得
Declaration
public T GetValue()
Returns
| Type | Description |
|---|---|
| T | 参照先の値 |
Exceptions
| Type | Condition |
|---|---|
| NullReferenceException | |
| InvalidOperationException | 参照先が現在のコンテキストで利用できない場合 |
SetValue(T)
参照先の書き換え
Declaration
public void SetValue(T value)
Parameters
| Type | Name | Description |
|---|---|---|
| T | value | 設定する値 |
Exceptions
| Type | Condition |
|---|---|
| NullReferenceException | |
| InvalidOperationException | 参照先が現在のコンテキストで利用できない場合 |