N
news.microsoft.com
Hello,
I'm a VB.NET guy converting a C# app to VB.NET and ran into an issue.
Steping through both the C# and VB.NET apps i get identical results but for
one section.
Notes: bit_buffer = 360 and bArray is an array of bytes going into these
lines of code
**********
(C#):
"bArray = (byte)bit_buffer;"
End result: bArray = 104
(VB.NET):
bArray(i) = CByte(bit_buffer)
End Result: Overflow because 360 can't fit into a byte of max 255
***********
My question is why does the C# version convert it into a byte value of 104
when the VB one doesn't??
Thanks in advance!
I'm a VB.NET guy converting a C# app to VB.NET and ran into an issue.
Steping through both the C# and VB.NET apps i get identical results but for
one section.
Notes: bit_buffer = 360 and bArray is an array of bytes going into these
lines of code
**********
(C#):
"bArray = (byte)bit_buffer;"
End result: bArray = 104
(VB.NET):
bArray(i) = CByte(bit_buffer)
End Result: Overflow because 360 can't fit into a byte of max 255
***********
My question is why does the C# version convert it into a byte value of 104
when the VB one doesn't??
Thanks in advance!