Table of Contents

Struct BlittableStructRef<T>

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

Represents a pointer to a structure.

public readonly struct BlittableStructRef<T> where T : struct

Type Parameters

T
Inherited Members

Constructors

BlittableStructRef(nint)

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

public BlittableStructRef(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 the value this pointer points to. Uses PtrToStructure<T>(nint) marshalling for marshalling the structure.

public 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.