System.UIntPtr.op_Addition Method

Adds an offset to the value of an unsigned pointer.

Syntax

public static UIntPtr operator+ (UIntPtr pointer, int offset)

Parameters

pointer
The unsigned pointer to add the offset to.
offset
The offset to add.

Returns

A new unsigned pointer that reflects the addition of offset to pointer.

Remarks

The UIntPtr.op_Addition(UIntPtr, int) method defines the addition operation for UIntPtr objects. It enables code such as the following.

code reference: System.UIntPtr.op_Addition#1

Languages that do not support custom operators can call the UIntPtr.Add(UIntPtr, int) method instead.

The addition operation does not throw an exception if the result is too large to represent as a pointer on the specified platform. Instead, it is performed in an unchecked context.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 4.0.0.0