Problem with assignment

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

    #1

    Problem with assignment

    I am having trouble with the following:

    Dim Key As Byte() = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
    0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16}
    Dim IV As Byte() = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
    0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16}

    The IDE shows a build error with the message:

    '}' expected

    with the little blue wavy line underlining the first item in the list
    (0x01). The interesting thing? I copied this from the help file in Visual
    Studio. See the topic:

    ..NET Framework Developer's Guide
    Encrypting Data [Visual Basic]

    Thanx for any advice,
    --
    Anil Gupte
    Innovate with UsLeading the Way in Advanced Technology Solutions Discover state-of-the-art services in logistics, databases, and AI designed for evolving

    www.icinema.com


  • Anil Gupte

    #2
    Re: Problem with assignment

    Great! That worked, although I have no idea why. Is the 0x01 the hex
    format for C#? And the equivalent is &H01 in VB? Is there any other way to
    represent Hex numbers?

    Thanx,
    --
    Anil Gupte
    Innovate with UsLeading the Way in Advanced Technology Solutions Discover state-of-the-art services in logistics, databases, and AI designed for evolving

    www.icinema.com

    "Kerry Moorman" <KerryMoorman@d iscussions.micr osoft.comwrote in message
    news:C23BC4C9-B77A-46DC-AB64-014C09AE52FF@mi crosoft.com...
    Anil,
    >
    You might try replacing 0x01 with &H01, etc.
    >
    Kerry Moorman
    >
    >
    "Anil Gupte" wrote:
    >
    >I am having trouble with the following:
    >>
    >Dim Key As Byte() = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
    >0x09,
    >0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16}
    >Dim IV As Byte() = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
    >0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16}
    >>
    >The IDE shows a build error with the message:
    >>
    >'}' expected
    >>
    >with the little blue wavy line underlining the first item in the list
    >(0x01). The interesting thing? I copied this from the help file in
    >Visual
    >Studio. See the topic:
    >>
    >..NET Framework Developer's Guide
    >Encrypting Data [Visual Basic]
    >>
    >Thanx for any advice,
    >--
    >Anil Gupte
    >www.keeninc.net
    >www.icinema.com
    >>
    >>
    >>

    Comment

    Working...