Unsafe.Subtract Method

Definition

Overloads

Subtract<T>(Void*, Int32)

Subtracts an element offset from the given void pointer.

Subtract<T>(T, Int32)

Subtracts an element offset from the given reference.

Subtract<T>(T, IntPtr)

Subtracts an element offset from the given reference.

Subtract<T>(Void*, Int32)

Subtracts an element offset from the given void pointer.

public:
generic <typename T>
 static void* Subtract(void* source, int elementOffset);
public static void* Subtract<T> (void* source, int elementOffset);
static member Subtract : nativeptr<unit> * int -> nativeptr<unit>

Type Parameters

T

The type of the void pointer.

Parameters

source
Void*

The void pointer to subtract the offset from.

elementOffset
Int32

The offset to subtract.

Returns

Void*

A new void pointer that reflects the subtraction of offset from the specified pointer.

Subtract<T>(T, Int32)

Subtracts an element offset from the given reference.

public:
generic <typename T>
 static T % Subtract(T % source, int elementOffset);
public static ref T Subtract<T> (ref T source, int elementOffset);
static member Subtract : 'T * int -> 'T
Public Shared Function Subtract(Of T) (ByRef source As T, elementOffset As Integer) As T

Type Parameters

T

The type of reference.

Parameters

source
T

The reference to subtract the offset from.

elementOffset
Int32

The offset to subtract.

Returns

T

A new reference that reflects the subtraction of offset from pointer.

Subtract<T>(T, IntPtr)

Subtracts an element offset from the given reference.

public:
generic <typename T>
 static T % Subtract(T % source, IntPtr elementOffset);
public static ref T Subtract<T> (ref T source, IntPtr elementOffset);
static member Subtract : 'T * nativeint -> 'T
Public Shared Function Subtract(Of T) (ByRef source As T, elementOffset As IntPtr) As T

Type Parameters

T

The type of reference.

Parameters

source
T

The reference to subtract the offset from.

elementOffset
IntPtr

The offset to subtract.

Returns

T

A new reference that reflects the subtraction of offset from pointer.

Applies to