|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
converting bitarray to int64I want to convert this bitarray to Int64. How can I do the same, when I take byte[] testbytes = new byte[bit1.Length]; bit1.CopyTo(testbytes, 0) where bit1 is my bit array I get everything as zero When I take bool[] testbytesbool = new bool[bit1.Length]; bit1.CopyTo(testbytesbool , 0) I get true and false at proper places.However this is not geting converted to in64. How do I conver this to in64. This is just an example as my bitarry is comprised of 200000 values. therefore I want to convert it to int64. <vidishasha***@gmail.com> ha scritto nel messaggio
Show quoteHide quote >I have a bitarray with values as {true,false,true,true} Use the BitConverter class :)> > I want to convert this bitarray to Int64. How can I do the same, > > when I take > byte[] testbytes = new byte[bit1.Length]; > bit1.CopyTo(testbytes, 0) > > where bit1 is my bit array > I get everything as zero > > When I take > bool[] testbytesbool = new bool[bit1.Length]; > bit1.CopyTo(testbytesbool , 0) > > I get true and false at proper places.However this is not geting > converted to in64. > > How do I conver this to in64. I am unable to use the same.
Can you give an example. to convert bool[] to in32 or int 64
Copying to the clipboard
breaking up a String into an array of chars and adding to datatable Make the value of MyObjectA equal to the value of MyObjectB? loading variable with AutoNumber field value after insert? Option Strict issue Network Communications Menu - Eliminate The Triangular Arror pointer thing - How to do it? System.Net.Sockets.SocketException Error not CLS-compliant How to go to the next control? |
|||||||||||||||||||||||