Convert hex data to ASCII decimal string format

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tiraman

    Convert hex data to ASCII decimal string format

    Hi ,

    I Would Like To Convert Some HEX Data to string format and opposite .

    does vb.net has some functions for that ?

    10x

    --
    Best Regards ,

    Tiraman :-)


  • Tom Shelton

    #2
    Re: Convert hex data to ASCII decimal string format

    On Sat, 29 May 2004 19:27:35 +0200, Tiraman wrote:
    [color=blue]
    > Hi ,
    >
    > I Would Like To Convert Some HEX Data to string format and opposite .
    >
    > does vb.net has some functions for that ?
    >
    > 10x[/color]

    Option Strict On
    Option Explicit On

    Imports System

    Module Module1

    Sub Main()
    Dim hexData As Integer = &HFFE2

    Dim sHex As String = Convert.ToStrin g(hexData, 16)
    Console.WriteLi ne(sHex)
    Console.WriteLi ne(Convert.ToIn t32(sHex, 16))
    End Sub

    End Module

    Is that what you mean?

    --
    Tom Shelton [MVP]

    Comment

    • Armin Zingler

      #3
      Re: Convert hex data to ASCII decimal string format

      "Tiraman" <tiraman@netvis ion.net.il> schrieb[color=blue]
      >
      > I Would Like To Convert Some HEX Data to string format and opposite
      > .
      >
      > does vb.net has some functions for that ?
      >
      > 10x[/color]

      dim s as string
      dim b as byte

      b = System.Convert. ToByte("ff", 16)
      s = b.tostring("X2" )


      --
      Armin

      How to quote and why:



      Comment

      • Herfried K. Wagner [MVP]

        #4
        Re: Convert hex data to ASCII decimal string format

        * "Tiraman" <tiraman@netvis ion.net.il> scripsit:[color=blue]
        > I Would Like To Convert Some HEX Data to string format and opposite .
        >
        > does vb.net has some functions for that ?[/color]

        'Hex', 'Val'.

        --
        Herfried K. Wagner [MVP]
        <URL:http://dotnet.mvps.org/>

        Comment

        • Tiraman

          #5
          Re: Convert hex data to ASCII decimal string format

          10x guys
          you helped me .

          "Tiraman" <tiraman@netvis ion.net.il> wrote in message
          news:uTQOupZREH A.3452@TK2MSFTN GP10.phx.gbl...[color=blue]
          > Hi ,
          >
          > I Would Like To Convert Some HEX Data to string format and opposite .
          >
          > does vb.net has some functions for that ?
          >
          > 10x
          >
          > --
          > Best Regards ,
          >
          > Tiraman :-)
          >
          >[/color]


          Comment

          Working...