Hi, I'm not able to figure out how I can convert an integer to an BitArray
Example:
8 (0,0,0,1,0,0,0,0)
3 (1,1,0,0.0.0.0.0)
I tried to Convert the Integer to a Byte[] in dotnet. This Byte[] I want to convert into an BitArray.
This Code is wrong and I can't even compile it.
I also tried ...
Help would be great
Example:
8 (0,0,0,1,0,0,0,0)
3 (1,1,0,0.0.0.0.0)
I tried to Convert the Integer to a Byte[] in dotnet. This Byte[] I want to convert into an BitArray.
This Code is wrong and I can't even compile it.
Int := 8; str := FORMAT(Int); SystemArray := SystemConvert.FromBase64String(str); BitArray := BitArray.BitArray(SystemArray); FOR i := 0 TO BitArray.Length - 1 DO BEGIN MESSAGE(FORMAT(BitArray.Get(i))); END;
I also tried ...
SystemArray := SystemArray.CreateInstance(GETDOTNETTYPE(SystemByte),4);
Help would be great