hex value

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

    #1

    hex value

    I want to set a char value to hex 1D, what is the best way to do this?
    Thanks,
    RickN


  • Stu Banter

    #2
    Re: hex value

    Cast with

    char c = (char) 0x1D; // use 0x for hex constants

    or convert using system.Convert:

    char c = Convert.ToChar (0x1D);

    Best!,
    Stu

    "RickN" <rick@abasoftwa re.com> wrote in message
    news:eZLfl5cjDH A.1096@TK2MSFTN GP11.phx.gbl...[color=blue]
    > I want to set a char value to hex 1D, what is the best way to do this?
    > Thanks,
    > RickN
    >
    >[/color]


    Comment

    • Mattias Sjögren

      #3
      Re: hex value

      [color=blue]
      >I want to set a char value to hex 1D, what is the best way to do this?[/color]

      char c = '\x1d';



      Mattias

      --
      Mattias Sjögren [MVP] mattias @ mvps.org

      Please reply only to the newsgroup.

      Comment

      Working...