Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Conversion types


  • Please log in to reply
No replies to this topic

#1 magarcan

magarcan

    Advanced Member

  • Members
  • PipPipPip
  • 43 posts

Posted 28 September 2011 - 02:50 PM

Hi! I'm porting some code from .NET to Micro Framework.
One of the instructions I've is this:
_devic = Convert.ToByte(ByteUtil.GetString(aux), 16);
What I need to do is convert an string that is in base 16 to a number. Then convert it into a byte.

The main problem is that I can't convert from base 10 to base 16...

After looking some info, I've seen that MicroFramework Convert.ToByte method has only one argument so I can't choose what the base is needed. Do you have any idea about how to solve this???

I've the same problem using Convert.ToUInt64, Convert.ToSByte...

Thanks!!!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.