Binary.From
Creates a binary from the given value
Syntax
Binary.From(
value as any,
optional encoding as BinaryEncoding.Type
) as binary
Remarks
Returns a binary value from the given value. If the given value is null, Binary.From returns null. If the given value is binary, value is returned. Values of the following types can be converted to a binary value:
text: Abinaryvalue from the text representation. Refer toBinary.FromTextfor details.
value is of any other type, an error is returned.
Examples
Example #1
Get the <code>binary</code> value of <code>"1011"</code>.
Binary.From("1011")
Result:
Binary.FromText("1011", BinaryEncoding.Base64)
Category
Binary