Table of Contents

Class BitConverterBE

Namespace
SunamoShared.Helpers.Text
Assembly
SunamoShared.dll

Provides big-endian byte conversion methods for unsigned integer types.

public static class BitConverterBE
Inheritance
BitConverterBE
Inherited Members

Methods

GetBytes(ushort)

Converts a ushort value to a big-endian byte array.

public static byte[] GetBytes(ushort value)

Parameters

value ushort

The value to convert.

Returns

byte[]

GetBytes(uint)

Converts a uint value to a big-endian byte array.

public static byte[] GetBytes(uint value)

Parameters

value uint

The value to convert.

Returns

byte[]

GetBytes(ulong)

Converts a ulong value to a big-endian byte array.

public static byte[] GetBytes(ulong value)

Parameters

value ulong

The value to convert.

Returns

byte[]

ToUInt16(byte[], int)

Converts two bytes at the specified index in a big-endian byte array to a ushort.

public static ushort ToUInt16(byte[] value, int startIndex)

Parameters

value byte[]

The byte array.

startIndex int

The starting index in the array.

Returns

ushort

ToUInt32(byte[], int)

Converts four bytes at the specified index in a big-endian byte array to a uint.

public static uint ToUInt32(byte[] value, int startIndex)

Parameters

value byte[]

The byte array.

startIndex int

The starting index in the array.

Returns

uint

ToUInt64(byte[], int)

Converts eight bytes at the specified index in a big-endian byte array to a ulong.

public static ulong ToUInt64(byte[] value, int startIndex)

Parameters

value byte[]

The byte array.

startIndex int

The starting index in the array.

Returns

ulong