Table of Contents

Struct BlittableRef<T>

Namespace
SampSharp.OpenMp.Core
Assembly
SampSharp.OpenMp.Core.dll

Represents a pointer to an unmanaged value.

public readonly struct BlittableRef<T> where T : unmanaged

Type Parameters

T

the type of the unmanaged value.

Inherited Members

Constructors

BlittableRef(nint)

Initializes a new instance of the BlittableRef<T> struct.

public BlittableRef(nint ptr)

Parameters

ptr nint

The pointer value.

Properties

HasValue

Gets a value indicating whether the pointer has a value (is not a null pointer).

public bool HasValue { get; }

Property Value

bool

Value

Gets a reference to the value this pointer points to.

public ref T Value { get; }

Property Value

T

Methods

GetValueOrDefault()

Gets the value this pointer points to or the default value of T if the pointer is null.

public T GetValueOrDefault()

Returns

T

The value this pointer points to or the default value of T if the pointer is null.

GetValueOrDefault(T)

Gets the value this pointer points to or the specified defaultValue if the pointer is null.

public T GetValueOrDefault(T defaultValue)

Parameters

defaultValue T

The default value to return if the pointer is null.

Returns

T

The value this pointer points to or the default value if the pointer is null.