Class SByteExtensions
IO-related extension methods for
Inheritance
System.Object
SByteExtensions
Namespace: X10D.IO
Assembly: X10D.dll
Syntax
public static class SByteExtensions : object
Methods
| Improve this Doc View SourceGetBytes(SByte)
Returns the current 16-bit unsigned integer value as an array of bytes.
Declaration
public static byte[] GetBytes(this sbyte value)
Parameters
Type | Name | Description |
---|---|---|
System.SByte | value | The number to convert. |
Returns
Type | Description |
---|---|
System.Byte[] | An array of bytes with length 1. |
TryWriteBytes(SByte, Span<Byte>)
Converts the current 16-bit unsigned integer into a span of bytes.
Declaration
public static bool TryWriteBytes(this sbyte value, Span<byte> destination)
Parameters
Type | Name | Description |
---|---|---|
System.SByte | value | The |
Span<System.Byte> | destination | When this method returns, the bytes representing the converted |
Returns
Type | Description |
---|---|
System.Boolean | true if the conversion was successful; otherwise, false. |