Unsafe Class
Definition
Contains generic, low-level functionality for manipulating pointers.
public ref class Unsafe abstract sealed
public static class Unsafe
type Unsafe = class
Public Class Unsafe
- Inheritance
-
Unsafe
Methods
Add<T>(T, Int32) |
Adds an element offset to the given reference. |
Add<T>(T, IntPtr) |
Adds an element offset to the given reference. |
Add<T>(Void*, Int32) |
Adds an element offset to the given void pointer. |
AddByteOffset<T>(T, IntPtr) |
Adds a byte offset to the given reference. |
AreSame<T>(T, T) |
Determines whether the specified references point to the same location. |
As<T>(Object) |
Casts the given object to the specified type. |
As<TFrom,TTo>(TFrom) |
Reinterprets the given reference as a reference to a value of type |
AsPointer<T>(T) |
Returns a pointer to the given by-ref parameter. |
AsRef<T>(T) |
Reinterprets the given read-only reference as a reference. |
AsRef<T>(Void*) |
Reinterprets the given location as a reference to a value of type |
ByteOffset<T>(T, T) |
Determines the byte offset from origin to target from the given references. |
Copy<T>(T, Void*) |
Copies a value of type |
Copy<T>(Void*, T) |
Copies a value of type |
CopyBlock(Byte, Byte, UInt32) |
Copies bytes from the source address to the destination address. |
CopyBlock(Void*, Void*, UInt32) |
Copies bytes from the source address to the destination address. |
CopyBlockUnaligned(Byte, Byte, UInt32) |
Copies bytes from the source address to the destination address without assuming architecture dependent alignment of the addresses. |
CopyBlockUnaligned(Void*, Void*, UInt32) |
Copies bytes from the source address to the destination address without assuming architecture dependent alignment of the addresses. |
InitBlock(Byte, Byte, UInt32) |
Initializes a block of memory at the given location with a given initial value. |
InitBlock(Void*, Byte, UInt32) |
Initializes a block of memory at the given location with a given initial value. |
InitBlockUnaligned(Byte, Byte, UInt32) |
Initializes a block of memory at the given location with a given initial value without assuming architecture dependent alignment of the address. |
InitBlockUnaligned(Void*, Byte, UInt32) |
Initializes a block of memory at the given location with a given initial value without assuming architecture dependent alignment of the address. |
IsAddressGreaterThan<T>(T, T) |
Returns a value that indicates whether a specified reference is greater than another specified reference. |
IsAddressLessThan<T>(T, T) |
Returns a value that indicates whether a specified reference is less than another specified reference. |
IsNullRef<T>(T) | |
NullRef<T>() | |
Read<T>(Void*) |
Reads a value of type |
ReadUnaligned<T>(Byte) |
Reads a value of type |
ReadUnaligned<T>(Void*) |
Reads a value of type |
SizeOf<T>() |
Returns the size of an object of the given type parameter. |
SkipInit<T>(T) |
Bypasses definite assignment rules for a given value. |
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. |
SubtractByteOffset<T>(T, IntPtr) |
Subtracts a byte offset from the given reference. |
Unbox<T>(Object) |
Returns a |
Write<T>(Void*, T) |
Writes a value of type |
WriteUnaligned<T>(Byte, T) |
Writes a value of type |
WriteUnaligned<T>(Void*, T) |
Writes a value of type |