Edit

Share via


BinaryPrimitives.ReverseEndianness Method

Definition

Overloads

ReverseEndianness(ReadOnlySpan<Int16>, Span<Int16>)

Copies every primitive value from source to destination, reversing each primitive by performing an endianness swap as part of writing each.

ReverseEndianness(ReadOnlySpan<Int32>, Span<Int32>)

Copies every primitive value from source to destination, reversing each primitive by performing an endianness swap as part of writing each.

ReverseEndianness(ReadOnlySpan<Int64>, Span<Int64>)

Copies every primitive value from source to destination, reversing each primitive by performing an endianness swap as part of writing each.

ReverseEndianness(ReadOnlySpan<IntPtr>, Span<IntPtr>)

Copies every primitive value from source to destination, reversing each primitive by performing an endianness swap as part of writing each.

ReverseEndianness(ReadOnlySpan<UInt64>, Span<UInt64>)

Copies every primitive value from source to destination, reversing each primitive by performing an endianness swap as part of writing each.

ReverseEndianness(ReadOnlySpan<UInt16>, Span<UInt16>)

Copies every primitive value from source to destination, reversing each primitive by performing an endianness swap as part of writing each.

ReverseEndianness(ReadOnlySpan<UInt32>, Span<UInt32>)

Copies every primitive value from source to destination, reversing each primitive by performing an endianness swap as part of writing each.

ReverseEndianness(ReadOnlySpan<Int128>, Span<Int128>)

Copies every primitive value from source to destination, reversing each primitive by performing an endianness swap as part of writing each.

ReverseEndianness(ReadOnlySpan<UIntPtr>, Span<UIntPtr>)

Copies every primitive value from source to destination, reversing each primitive by performing an endianness swap as part of writing each.

ReverseEndianness(ReadOnlySpan<UInt128>, Span<UInt128>)

Copies every primitive value from source to destination, reversing each primitive by performing an endianness swap as part of writing each.

ReverseEndianness(UIntPtr)

Reverses a primitive value by performing an endianness swap of the specified UIntPtr value.

ReverseEndianness(Int64)

Reverses a primitive value by performing an endianness swap of the specified Int64 value.

ReverseEndianness(UInt32)

Reverses a primitive value by performing an endianness swap of the specified UInt32 value.

ReverseEndianness(UInt16)

Reverses a primitive value by performing an endianness swap of the specified UInt16 value.

ReverseEndianness(UInt128)

Reverses a primitive value by performing an endianness swap of the specified UInt128 value.

ReverseEndianness(SByte)

Reverses a primitive value by performing an endianness swap of the specified SByte value, which effectively does nothing for an SByte.

ReverseEndianness(IntPtr)

Reverses a primitive value by performing an endianness swap of the specified IntPtr value.

ReverseEndianness(UInt64)

Reverses a primitive value by performing an endianness swap of the specified UInt64 value.

ReverseEndianness(Int32)

Reverses a primitive value by performing an endianness swap of the specified Int32 value.

ReverseEndianness(Int16)

Reverses a primitive value by performing an endianness swap of the specified Int16 value.

ReverseEndianness(Int128)

Reverses a primitive value by performing an endianness swap of the specified Int128 value.

ReverseEndianness(Byte)

Reverses a primitive value by performing an endianness swap of the specified Byte value, which effectively does nothing for a Byte.

ReverseEndianness(ReadOnlySpan<Int16>, Span<Int16>)

Source:
BinaryPrimitives.ReverseEndianness.cs
Source:
BinaryPrimitives.ReverseEndianness.cs

Copies every primitive value from source to destination, reversing each primitive by performing an endianness swap as part of writing each.

public:
 static void ReverseEndianness(ReadOnlySpan<short> source, Span<short> destination);
public static void ReverseEndianness (ReadOnlySpan<short> source, Span<short> destination);
static member ReverseEndianness : ReadOnlySpan<int16> * Span<int16> -> unit
Public Shared Sub ReverseEndianness (source As ReadOnlySpan(Of Short), destination As Span(Of Short))

Parameters

source
ReadOnlySpan<Int16>

The source span to copy.

destination
Span<Int16>

The destination to which the source elements should be copied.

Applies to

ReverseEndianness(ReadOnlySpan<Int32>, Span<Int32>)

Source:
BinaryPrimitives.ReverseEndianness.cs
Source:
BinaryPrimitives.ReverseEndianness.cs

Copies every primitive value from source to destination, reversing each primitive by performing an endianness swap as part of writing each.

public:
 static void ReverseEndianness(ReadOnlySpan<int> source, Span<int> destination);
public static void ReverseEndianness (ReadOnlySpan<int> source, Span<int> destination);
static member ReverseEndianness : ReadOnlySpan<int> * Span<int> -> unit
Public Shared Sub ReverseEndianness (source As ReadOnlySpan(Of Integer), destination As Span(Of Integer))

Parameters

source
ReadOnlySpan<Int32>

The source span to copy.

destination
Span<Int32>

The destination to which the source elements should be copied.

Applies to

ReverseEndianness(ReadOnlySpan<Int64>, Span<Int64>)

Source:
BinaryPrimitives.ReverseEndianness.cs
Source:
BinaryPrimitives.ReverseEndianness.cs

Copies every primitive value from source to destination, reversing each primitive by performing an endianness swap as part of writing each.

public:
 static void ReverseEndianness(ReadOnlySpan<long> source, Span<long> destination);
public static void ReverseEndianness (ReadOnlySpan<long> source, Span<long> destination);
static member ReverseEndianness : ReadOnlySpan<int64> * Span<int64> -> unit
Public Shared Sub ReverseEndianness (source As ReadOnlySpan(Of Long), destination As Span(Of Long))

Parameters

source
ReadOnlySpan<Int64>

The source span to copy.

destination
Span<Int64>

The destination to which the source elements should be copied.

Applies to

ReverseEndianness(ReadOnlySpan<IntPtr>, Span<IntPtr>)

Source:
BinaryPrimitives.ReverseEndianness.cs
Source:
BinaryPrimitives.ReverseEndianness.cs

Copies every primitive value from source to destination, reversing each primitive by performing an endianness swap as part of writing each.

public:
 static void ReverseEndianness(ReadOnlySpan<IntPtr> source, Span<IntPtr> destination);
public static void ReverseEndianness (ReadOnlySpan<IntPtr> source, Span<IntPtr> destination);
static member ReverseEndianness : ReadOnlySpan<nativeint> * Span<nativeint> -> unit
Public Shared Sub ReverseEndianness (source As ReadOnlySpan(Of IntPtr), destination As Span(Of IntPtr))

Parameters

source

ReadOnlySpan<IntPtr>

ReadOnlySpan<nativeint>

The source span to copy.

destination

Span<IntPtr>

Span<nativeint>

The destination to which the source elements should be copied.

Applies to

ReverseEndianness(ReadOnlySpan<UInt64>, Span<UInt64>)

Source:
BinaryPrimitives.ReverseEndianness.cs
Source:
BinaryPrimitives.ReverseEndianness.cs

Important

This API is not CLS-compliant.

Copies every primitive value from source to destination, reversing each primitive by performing an endianness swap as part of writing each.

public:
 static void ReverseEndianness(ReadOnlySpan<System::UInt64> source, Span<System::UInt64> destination);
[System.CLSCompliant(false)]
public static void ReverseEndianness (ReadOnlySpan<ulong> source, Span<ulong> destination);
[<System.CLSCompliant(false)>]
static member ReverseEndianness : ReadOnlySpan<uint64> * Span<uint64> -> unit
Public Shared Sub ReverseEndianness (source As ReadOnlySpan(Of ULong), destination As Span(Of ULong))

Parameters

source
ReadOnlySpan<UInt64>

The source span to copy.

destination
Span<UInt64>

The destination to which the source elements should be copied.

Attributes

Applies to

ReverseEndianness(ReadOnlySpan<UInt16>, Span<UInt16>)

Source:
BinaryPrimitives.ReverseEndianness.cs
Source:
BinaryPrimitives.ReverseEndianness.cs

Important

This API is not CLS-compliant.

Copies every primitive value from source to destination, reversing each primitive by performing an endianness swap as part of writing each.

public:
 static void ReverseEndianness(ReadOnlySpan<System::UInt16> source, Span<System::UInt16> destination);
[System.CLSCompliant(false)]
public static void ReverseEndianness (ReadOnlySpan<ushort> source, Span<ushort> destination);
[<System.CLSCompliant(false)>]
static member ReverseEndianness : ReadOnlySpan<uint16> * Span<uint16> -> unit
Public Shared Sub ReverseEndianness (source As ReadOnlySpan(Of UShort), destination As Span(Of UShort))

Parameters

source
ReadOnlySpan<UInt16>

The source span to copy.

destination
Span<UInt16>

The destination to which the source elements should be copied.

Attributes

Exceptions

The destination's length is smaller than that of the source.

Remarks

The source and destination spans may overlap. The same span may be passed as both the source and the destination in order to reverse each element's endianness in place.

Applies to

ReverseEndianness(ReadOnlySpan<UInt32>, Span<UInt32>)

Source:
BinaryPrimitives.ReverseEndianness.cs
Source:
BinaryPrimitives.ReverseEndianness.cs

Important

This API is not CLS-compliant.

Copies every primitive value from source to destination, reversing each primitive by performing an endianness swap as part of writing each.

public:
 static void ReverseEndianness(ReadOnlySpan<System::UInt32> source, Span<System::UInt32> destination);
[System.CLSCompliant(false)]
public static void ReverseEndianness (ReadOnlySpan<uint> source, Span<uint> destination);
[<System.CLSCompliant(false)>]
static member ReverseEndianness : ReadOnlySpan<uint32> * Span<uint32> -> unit
Public Shared Sub ReverseEndianness (source As ReadOnlySpan(Of UInteger), destination As Span(Of UInteger))

Parameters

source
ReadOnlySpan<UInt32>

The source span to copy.

destination
Span<UInt32>

The destination to which the source elements should be copied.

Attributes

Applies to

ReverseEndianness(ReadOnlySpan<Int128>, Span<Int128>)

Source:
BinaryPrimitives.ReverseEndianness.cs
Source:
BinaryPrimitives.ReverseEndianness.cs

Copies every primitive value from source to destination, reversing each primitive by performing an endianness swap as part of writing each.

public:
 static void ReverseEndianness(ReadOnlySpan<Int128> source, Span<Int128> destination);
public static void ReverseEndianness (ReadOnlySpan<Int128> source, Span<Int128> destination);
static member ReverseEndianness : ReadOnlySpan<Int128> * Span<Int128> -> unit
Public Shared Sub ReverseEndianness (source As ReadOnlySpan(Of Int128), destination As Span(Of Int128))

Parameters

source
ReadOnlySpan<Int128>

The source span to copy.

destination
Span<Int128>

The destination to which the source elements should be copied.

Applies to

ReverseEndianness(ReadOnlySpan<UIntPtr>, Span<UIntPtr>)

Source:
BinaryPrimitives.ReverseEndianness.cs
Source:
BinaryPrimitives.ReverseEndianness.cs

Important

This API is not CLS-compliant.

Copies every primitive value from source to destination, reversing each primitive by performing an endianness swap as part of writing each.

public:
 static void ReverseEndianness(ReadOnlySpan<UIntPtr> source, Span<UIntPtr> destination);
[System.CLSCompliant(false)]
public static void ReverseEndianness (ReadOnlySpan<UIntPtr> source, Span<UIntPtr> destination);
[<System.CLSCompliant(false)>]
static member ReverseEndianness : ReadOnlySpan<unativeint> * Span<unativeint> -> unit
Public Shared Sub ReverseEndianness (source As ReadOnlySpan(Of UIntPtr), destination As Span(Of UIntPtr))

Parameters

source

ReadOnlySpan<UIntPtr>

ReadOnlySpan<unativeint>

The source span to copy.

destination

Span<UIntPtr>

Span<unativeint>

The destination to which the source elements should be copied.

Attributes

Applies to

ReverseEndianness(ReadOnlySpan<UInt128>, Span<UInt128>)

Source:
BinaryPrimitives.ReverseEndianness.cs
Source:
BinaryPrimitives.ReverseEndianness.cs

Important

This API is not CLS-compliant.

Copies every primitive value from source to destination, reversing each primitive by performing an endianness swap as part of writing each.

public:
 static void ReverseEndianness(ReadOnlySpan<UInt128> source, Span<UInt128> destination);
[System.CLSCompliant(false)]
public static void ReverseEndianness (ReadOnlySpan<UInt128> source, Span<UInt128> destination);
[<System.CLSCompliant(false)>]
static member ReverseEndianness : ReadOnlySpan<UInt128> * Span<UInt128> -> unit
Public Shared Sub ReverseEndianness (source As ReadOnlySpan(Of UInt128), destination As Span(Of UInt128))

Parameters

source
ReadOnlySpan<UInt128>

The source span to copy.

destination
Span<UInt128>

The destination to which the source elements should be copied.

Attributes

Applies to

ReverseEndianness(UIntPtr)

Source:
BinaryPrimitives.ReverseEndianness.cs
Source:
BinaryPrimitives.ReverseEndianness.cs

Important

This API is not CLS-compliant.

Reverses a primitive value by performing an endianness swap of the specified UIntPtr value.

public:
 static UIntPtr ReverseEndianness(UIntPtr value);
[System.CLSCompliant(false)]
public static UIntPtr ReverseEndianness (UIntPtr value);
[<System.CLSCompliant(false)>]
static member ReverseEndianness : unativeint -> unativeint
Public Shared Function ReverseEndianness (value As UIntPtr) As UIntPtr

Parameters

value
UIntPtr

unativeint

The value to reverse.

Returns

UIntPtr

unativeint

The reversed value.

Attributes

Applies to

ReverseEndianness(Int64)

Source:
Reader.cs
Source:
BinaryPrimitives.ReverseEndianness.cs
Source:
BinaryPrimitives.ReverseEndianness.cs

Reverses a primitive value by performing an endianness swap of the specified Int64 value.

public:
 static long ReverseEndianness(long value);
public static long ReverseEndianness (long value);
static member ReverseEndianness : int64 -> int64
Public Shared Function ReverseEndianness (value As Long) As Long

Parameters

value
Int64

The value to reverse.

Returns

The reversed value.

Applies to

ReverseEndianness(UInt32)

Source:
Reader.cs
Source:
BinaryPrimitives.ReverseEndianness.cs
Source:
BinaryPrimitives.ReverseEndianness.cs

Important

This API is not CLS-compliant.

Reverses a primitive value by performing an endianness swap of the specified UInt32 value.

public:
 static System::UInt32 ReverseEndianness(System::UInt32 value);
[System.CLSCompliant(false)]
public static uint ReverseEndianness (uint value);
[<System.CLSCompliant(false)>]
static member ReverseEndianness : uint32 -> uint32
Public Shared Function ReverseEndianness (value As UInteger) As UInteger

Parameters

value
UInt32

The value to reverse.

Returns

The reversed value.

Attributes

Applies to

ReverseEndianness(UInt16)

Source:
Reader.cs
Source:
BinaryPrimitives.ReverseEndianness.cs
Source:
BinaryPrimitives.ReverseEndianness.cs

Important

This API is not CLS-compliant.

Reverses a primitive value by performing an endianness swap of the specified UInt16 value.

public:
 static System::UInt16 ReverseEndianness(System::UInt16 value);
[System.CLSCompliant(false)]
public static ushort ReverseEndianness (ushort value);
[<System.CLSCompliant(false)>]
static member ReverseEndianness : uint16 -> uint16
Public Shared Function ReverseEndianness (value As UShort) As UShort

Parameters

value
UInt16

The value to reverse.

Returns

The reversed value.

Attributes

Applies to

ReverseEndianness(UInt128)

Source:
BinaryPrimitives.ReverseEndianness.cs
Source:
BinaryPrimitives.ReverseEndianness.cs

Important

This API is not CLS-compliant.

Reverses a primitive value by performing an endianness swap of the specified UInt128 value.

public:
 static UInt128 ReverseEndianness(UInt128 value);
[System.CLSCompliant(false)]
public static UInt128 ReverseEndianness (UInt128 value);
[<System.CLSCompliant(false)>]
static member ReverseEndianness : UInt128 -> UInt128
Public Shared Function ReverseEndianness (value As UInt128) As UInt128

Parameters

value
UInt128

The value to reverse.

Returns

The reversed value.

Attributes

Applies to

ReverseEndianness(SByte)

Source:
Reader.cs
Source:
BinaryPrimitives.ReverseEndianness.cs
Source:
BinaryPrimitives.ReverseEndianness.cs

Important

This API is not CLS-compliant.

Reverses a primitive value by performing an endianness swap of the specified SByte value, which effectively does nothing for an SByte.

public:
 static System::SByte ReverseEndianness(System::SByte value);
[System.CLSCompliant(false)]
public static sbyte ReverseEndianness (sbyte value);
[<System.CLSCompliant(false)>]
static member ReverseEndianness : sbyte -> sbyte
Public Shared Function ReverseEndianness (value As SByte) As SByte

Parameters

value
SByte

The value to reverse.

Returns

The passed-in value, unmodified.

Attributes

Remarks

This method effectively does nothing and was added only for consistency.

Applies to

ReverseEndianness(IntPtr)

Source:
BinaryPrimitives.ReverseEndianness.cs
Source:
BinaryPrimitives.ReverseEndianness.cs

Reverses a primitive value by performing an endianness swap of the specified IntPtr value.

public:
 static IntPtr ReverseEndianness(IntPtr value);
public static IntPtr ReverseEndianness (IntPtr value);
static member ReverseEndianness : nativeint -> nativeint
Public Shared Function ReverseEndianness (value As IntPtr) As IntPtr

Parameters

value
IntPtr

nativeint

The value to reverse.

Returns

IntPtr

nativeint

The reversed value.

Applies to

ReverseEndianness(UInt64)

Source:
Reader.cs
Source:
BinaryPrimitives.ReverseEndianness.cs
Source:
BinaryPrimitives.ReverseEndianness.cs

Important

This API is not CLS-compliant.

Reverses a primitive value by performing an endianness swap of the specified UInt64 value.

public:
 static System::UInt64 ReverseEndianness(System::UInt64 value);
[System.CLSCompliant(false)]
public static ulong ReverseEndianness (ulong value);
[<System.CLSCompliant(false)>]
static member ReverseEndianness : uint64 -> uint64
Public Shared Function ReverseEndianness (value As ULong) As ULong

Parameters

value
UInt64

The value to reverse.

Returns

The reversed value.

Attributes

Applies to

ReverseEndianness(Int32)

Source:
Reader.cs
Source:
BinaryPrimitives.ReverseEndianness.cs
Source:
BinaryPrimitives.ReverseEndianness.cs

Reverses a primitive value by performing an endianness swap of the specified Int32 value.

public:
 static int ReverseEndianness(int value);
public static int ReverseEndianness (int value);
static member ReverseEndianness : int -> int
Public Shared Function ReverseEndianness (value As Integer) As Integer

Parameters

value
Int32

The value to reverse.

Returns

The reversed value.

Applies to

ReverseEndianness(Int16)

Source:
Reader.cs
Source:
BinaryPrimitives.ReverseEndianness.cs
Source:
BinaryPrimitives.ReverseEndianness.cs

Reverses a primitive value by performing an endianness swap of the specified Int16 value.

public:
 static short ReverseEndianness(short value);
public static short ReverseEndianness (short value);
static member ReverseEndianness : int16 -> int16
Public Shared Function ReverseEndianness (value As Short) As Short

Parameters

value
Int16

The value to reverse.

Returns

The reversed value.

Applies to

ReverseEndianness(Int128)

Source:
BinaryPrimitives.ReverseEndianness.cs
Source:
BinaryPrimitives.ReverseEndianness.cs

Reverses a primitive value by performing an endianness swap of the specified Int128 value.

public:
 static Int128 ReverseEndianness(Int128 value);
public static Int128 ReverseEndianness (Int128 value);
static member ReverseEndianness : Int128 -> Int128
Public Shared Function ReverseEndianness (value As Int128) As Int128

Parameters

value
Int128

The value to reverse.

Returns

The reversed value.

Applies to

ReverseEndianness(Byte)

Source:
Reader.cs
Source:
BinaryPrimitives.ReverseEndianness.cs
Source:
BinaryPrimitives.ReverseEndianness.cs

Reverses a primitive value by performing an endianness swap of the specified Byte value, which effectively does nothing for a Byte.

public:
 static System::Byte ReverseEndianness(System::Byte value);
public static byte ReverseEndianness (byte value);
static member ReverseEndianness : byte -> byte
Public Shared Function ReverseEndianness (value As Byte) As Byte

Parameters

value
Byte

The value to reverse.

Returns

The passed-in value, unmodified.

Remarks

This method effectively does nothing and was added only for consistency.

Applies to