Converting integer to hex string

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

    #1

    Converting integer to hex string

    Does C# provide a function for converting an integer to a hex string?


  • Bram

    #2
    Re: Converting integer to hex string

    Hi,

    yes it does,

    eg
    int a = 123;
    a.ToString("X8" ); for 8 hex characters

    Greetings,

    Bram

    "Dan" <dan@dontspamme .com> wrote in message
    news:et4Xx0Z5DH A.1592@TK2MSFTN GP10.phx.gbl...[color=blue]
    > Does C# provide a function for converting an integer to a hex string?
    >
    >[/color]


    Comment

    • Dan

      #3
      Re: Converting integer to hex string

      Thanks. It sure was hard to find that in the documentation. I did all
      these searches on "integer" "convert" "hex" and came up blank.

      "Bram" <bvnews1@nospam .skynet.be> wrote in message
      news:4017b14c$0 $778$ba620e4c@n ews.skynet.be.. .[color=blue]
      > Hi,
      >
      > yes it does,
      >
      > eg
      > int a = 123;
      > a.ToString("X8" ); for 8 hex characters
      >
      > Greetings,
      >
      > Bram
      >
      > "Dan" <dan@dontspamme .com> wrote in message
      > news:et4Xx0Z5DH A.1592@TK2MSFTN GP10.phx.gbl...[color=green]
      > > Does C# provide a function for converting an integer to a hex string?
      > >
      > >[/color]
      >
      >[/color]


      Comment

      Working...