Results 1 to 3 of 3
  1. #1
    liran is offline Member
    Join Date
    Apr 2010
    Posts
    18
    Rep Power
    0

    Default Java matching CSharp (C#) byte.Parse(hex, System.Globalization.NumberStyles.HexNumber

    Hey,

    I have the following code in C-Sharp:
    byte newByte = byte.Parse(hex, System.Globalization.NumberStyles.HexNumber);

    What's the equivalent in Java ?

    Thanks !

  2. #2
    wsaryada is offline Senior Member
    Join Date
    Jun 2007
    Location
    Bali, Indonesia
    Posts
    757
    Rep Power
    7

    Default Re: Java matching CSharp (C#) byte.Parse(hex, System.Globalization.NumberStyles.HexNu

    Have you tried?

    Java Code:
    Integer.parseInt(hex, 16);

  3. #3
    liran is offline Member
    Join Date
    Apr 2010
    Posts
    18
    Rep Power
    0

    Default Re: Java matching CSharp (C#) byte.Parse(hex, System.Globalization.NumberStyles.HexNu

    Thanks !

Similar Threads

  1. Java idiom to define a call patttern matching a CFG
    By Steve641 in forum Advanced Java
    Replies: 1
    Last Post: 09-16-2013, 12:35 PM
  2. Matching picture game in java
    By iswan in forum New To Java
    Replies: 1
    Last Post: 09-08-2011, 02:02 AM
  3. Read a bitmap byte by byte
    By cbr400aero in forum Java 2D
    Replies: 2
    Last Post: 10-18-2010, 11:42 PM
  4. Replies: 1
    Last Post: 04-21-2010, 02:28 AM
  5. Parse Arraylist to Byte
    By Deepa in forum New To Java
    Replies: 1
    Last Post: 03-13-2009, 12:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •