Press CTRL+C or CMD+C to copy the selected text and close this dialog.
Tweet
2 people like it. Like the snippet!
Recursive function for converting byte array to binary string
1: 2: 3: 4: 5: 6: 7:
let convertToBinaryString bytes = let rec loop (acc : string) (lst : byte list) = match lst with | [] -> acc | _ -> loop (acc + (Convert.ToString(lst.Head, 2).PadLeft(8, '0'))) lst.Tail loop "" (Array.toList bytes)