By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,251 Members | 2,760 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,251 IT Pros & Developers. It's quick & easy.

Problem with assignment

P: n/a
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
Dec 15 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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" <Ke**********@discussions.microsoft.comwrote in message
news:C2**********************************@microsof t.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

Dec 15 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.