Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
struct System.​Numerics.​IBinaryInteger`1
Assembly: System.Runtime
Defines an integer type that is represented in a base-2 format.
Methods
public
int
GetByteCount​() Returns The number of bytes that will be written as part of <see cref="M:System.Numerics.IBinaryInteger`1.TryWriteLittleEndian(System.Span{System.Byte},System.Int32@)" /> .
Gets the number of bytes that will be written as part of <see cref="M:System.Numerics.IBinaryInteger`1.TryWriteLittleEndian(System.Span{System.Byte},System.Int32@)" /> .
public
int
GetShortestBitLength​() Returns The length, in bits, of the shortest two's complement representation of the current value.
Gets the length, in bits, of the shortest two's complement representation of the current value.
public
int
WriteBigEndian​(byte[] destination)
destination
The array to which the current value should be written.
Returns The number of bytes written to <paramref name="destination" /> .
Writes the current value, in big-endian format, to a given array.
public
int
WriteBigEndian​(byte[] destination,
int startIndex)
destination
The array to which the current value should be written.
startIndex
The starting index at which the value should be written.
Returns The number of bytes written to <paramref name="destination" /> starting at <paramref name="startIndex" /> .
Writes the current value, in big-endian format, to a given array.
public
int
WriteLittleEndian​(byte[] destination)
destination
The array to which the current value should be written.
Returns The number of bytes written to <paramref name="destination" /> .
Writes the current value, in little-endian format, to a given array.
public
int
WriteLittleEndian​(byte[] destination,
int startIndex)
destination
The array to which the current value should be written.
startIndex
The starting index at which the value should be written.
Returns The number of bytes written to <paramref name="destination" /> starting at <paramref name="startIndex" /> .
Writes the current value, in little-endian format, to a specified array starting at a specified index.