Beginner Question

  • Thread starter Thread starter Brent
  • Start date Start date
B

Brent

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
 
Brent said:
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

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

--


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

Jon Skeet said:
Brent said:
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

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