Class BooleanExtensions
Extension methods for
Inheritance
System.Object
BooleanExtensions
Namespace: X10D.IO
Assembly: X10D.dll
Syntax
public static class BooleanExtensions : object
Methods
| Improve this Doc View SourceGetBytes(Boolean)
Returns the current boolean value as an array of bytes.
Declaration
public static byte[] GetBytes(this bool value)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | value | The value to convert. |
Returns
Type | Description |
---|---|
System.Byte[] | An array of bytes with length 1. |
TryWriteBytes(Boolean, Span<Byte>)
Converts a
Declaration
public static bool TryWriteBytes(this bool value, Span<byte> destination)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | 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. |