Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 13th, 2005, 11:52 PM
Registered User
 
Join Date: Mar 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Binary Data OR Byte() OR BitArray... to Integer

In C/C++/Obj-C, changing a binary representation of a number into an int or a double or whatever is a very simple affair (one short line of code). I'm having a heck of a time figuring out how to do the same in VB.NET without writing my own iterative bitshifting function, which I don't want to do.

I have a String with binary data in it. Various pieces of it need to be interpreted as integers, longs, singles, or doubles. I use the Substring() method to get a little 2-byte piece and then..... what? I can use GetBytes() and use that to create a new BitArray, but.... again... I'm stuck there too.

What am I missing here?

I'm sure it's simple. I'm just not seeing it in the documentation.

Please help. Thanks!

- Philip





Similar Threads
Thread Thread Starter Forum Replies Last Post
Binary Data zaghmout ASP.NET 2.0 Basics 0 November 15th, 2007 06:24 AM
datagrid does SORT integer data properly chayanvinayak Flash (all versions) 3 July 27th, 2006 02:59 PM
Byte alignment or byte padding subodh_chettri C++ Programming 0 June 23rd, 2006 10:35 AM
integer data type in infopath vikram_vikram Other Programming Languages 0 November 29th, 2005 02:54 AM
Binary Data in XML owain XML 1 November 11th, 2003 11:22 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.