Problem with assignment

  • Thread starter Thread starter Anil Gupte
  • Start date Start date
A

Anil Gupte

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,
 
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
www.keeninc.net
www.icinema.com

Kerry Moorman said:
Anil,

You might try replacing 0x01 with &H01, etc.

Kerry Moorman


Anil Gupte said:
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,
 
Back
Top