"Danny Ni" <dn*@yahoo.com> schrieb:
Can somebody translate the following c# code into Vb.Net?
byte[] myData = new byte[nFileLen];
I tried
Dim myData As Byte() = New Byte(nFileLen)
Does not compile , with error message:
Type 'byte' has no constructors.
I would choose the solution posted by alejandro. However, you can make the
code above work with a little change:
\\\
Dim FileLen As Integer = 22
Dim MyData1 As Byte() = New Byte(FileLen - 1) {}
Dim MyData3() As Byte = New Byte(FileLen - 1) {}
Dim MyData4(FileLen - 1) As Byte
///
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>