PC Review


Reply
Thread Tools Rate Thread

Convert int to BitArray

 
 
Glen Wilkin via DotNetMonster.com
Guest
Posts: n/a
 
      21st Sep 2005
I want to convert an int to binary and put the binary number's bits into a
BitArray.
Anyone know how to do this?


--
Message posted via http://www.dotnetmonster.com
 
Reply With Quote
 
 
 
 
=?Utf-8?B?TWFya1QgW2RldmVsb3BtZW50b3Jd?=
Guest
Posts: n/a
 
      21st Sep 2005
System.BitConverter.GetBytes(int) yields a byte[].

BitArray(byte[]) constructor.
 
Reply With Quote
 
Glen Wilkin via DotNetMonster.com
Guest
Posts: n/a
 
      21st Sep 2005
MarkT [developmentor] wrote:
>System.BitConverter.GetBytes(int) yields a byte[].
>
>BitArray(byte[]) constructor.


Thanks a lot


--
Message posted via http://www.dotnetmonster.com
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
BitArray -> int Alexander Vasilevsky Microsoft C# .NET 2 28th Nov 2011 05:25 AM
BitArray bug or I am confused? semedao Microsoft C# .NET 2 9th Jan 2007 07:07 AM
Help: BitArray James Microsoft VB .NET 0 14th Nov 2005 05:11 PM
Convert BitArray to hexadecimal string Joel Moore Microsoft Dot NET 2 11th May 2004 02:43 PM
How can I convert an Int to a BitArray ? Marc Lefebvre Microsoft C# .NET 1 11th Sep 2003 07:07 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:44 PM.