Beginner Question

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

    Beginner Question

    Hi everyone. I tried to convert this line of code last night from vb.net to
    C# and i had problems. Could anyone tell me you how you would convert this
    line of code to C#:


    Private Vector() As Byte = {&H12, &H44, &H16, &HEE, &H88, &H15, &HDD,
    &H41}Of course the problem is with defining the hex values. I have no idea
    how to do that in C# and when i searched on google how to do it i didn't
    find any good examples.thanks
    --


    ----------------------------------------------------
    This mailbox protected from junk email by MailFrontier Desktop
    from MailFrontier, Inc. http://info.mailfrontier.com


  • Jon Skeet [C# MVP]

    #2
    Re: Beginner Question

    Brent <brentwa@remove .hotmail.com> wrote:[color=blue]
    > Hi everyone. I tried to convert this line of code last night from vb.net to
    > C# and i had problems. Could anyone tell me you how you would convert this
    > line of code to C#:
    >
    >
    > Private Vector() As Byte = {&H12, &H44, &H16, &HEE, &H88, &H15, &HDD,
    > &H41}Of course the problem is with defining the hex values. I have no idea
    > how to do that in C# and when i searched on google how to do it i didn't
    > find any good examples.thanks[/color]

    byte[] Vector = new byte[] {0x12, 0x44, 0x16, 0xee, 0x88, 0x15, 0xdd,
    0x41};

    --
    Jon Skeet - <skeet@pobox.co m>
    Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.

    If replying to the group, please do not mail me too

    Comment

    • Brent

      #3
      Re: Beginner Question

      thanks jon

      --


      ----------------------------------------------------
      This mailbox protected from junk email by MailFrontier Desktop
      from MailFrontier, Inc. http://info.mailfrontier.com

      "Jon Skeet [C# MVP]" <skeet@pobox.co m> wrote in message
      news:MPG.1cfdae fedadd21be98c1b 7@msnews.micros oft.com...[color=blue]
      > Brent <brentwa@remove .hotmail.com> wrote:[color=green]
      >> Hi everyone. I tried to convert this line of code last night from vb.net
      >> to
      >> C# and i had problems. Could anyone tell me you how you would convert
      >> this
      >> line of code to C#:
      >>
      >>
      >> Private Vector() As Byte = {&H12, &H44, &H16, &HEE, &H88, &H15, &HDD,
      >> &H41}Of course the problem is with defining the hex values. I have no
      >> idea
      >> how to do that in C# and when i searched on google how to do it i didn't
      >> find any good examples.thanks[/color]
      >
      > byte[] Vector = new byte[] {0x12, 0x44, 0x16, 0xee, 0x88, 0x15, 0xdd,
      > 0x41};
      >
      > --
      > Jon Skeet - <skeet@pobox.co m>
      > http://www.pobox.com/~skeet
      > If replying to the group, please do not mail me too[/color]


      Comment

      Working...