Home All Groups Group Topic Archive Search About

Problem with assignment

Author
15 Dec 2006 3:34 PM
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,

Author
15 Dec 2006 4:04 PM
Kerry Moorman
Anil,

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

Kerry Moorman


Show quoteHide quote
"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
>
>
>
Author
15 Dec 2006 6:00 PM
Anil Gupte
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,
Show quoteHide quote
"Kerry Moorman" <KerryMoor***@discussions.microsoft.com> wrote in message
news:C23BC4C9-B77A-46DC-AB64-014C09AE52FF@microsoft.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
>>
>>
>>