Table of contents
TOC
Collapse the table of content
Expand the table of content

Binary.From

Owen Duncan|Last Updated: 4/19/2018

About

Returns a binary value from the given value.

Binary.From(Value as any, optional encoding as nullable number) as nullable binary  

Arguments

ArgumentDescription
valueA binary value from the text representation. For more information, see Binary.FromText.
optional encodingThe encoding option to apply.

Binary encoding

  • BinaryEncoding.Base64 = 0;

  • BinaryEncoding.Hex = 1;

Remarks

  • If the given value is null, Binary.From returns null. If the given value is binary, the same value is returned.

  • Values of the following types can be converted to a binary value:

  • If value is of any other type, an error is returned.

Example

Binary.From("1011")equals Binary.FromText("1011", BinaryEncoding.Base64)  
© 2018 Microsoft