Board index » Visual Studio » Option Strict and reading bytes from File
|
anonymous
|
|
anonymous
|
Option Strict and reading bytes from File
Visual Studio54
Hi, I want to read a fixed number of bytes from a file and when I turned on the Option Strict I get an error I just can't fix. The code: Dim baInfo(99) As Byte FileGet(iFilNr, baInfo, 5) The Error: Option Strict On disallows narrowing from type 'System.Array' to type '1-dimensional array of Byte' in copying the value of 'ByRef' parameter 'Value' back to the matching argument. Anyone any ideas? /Kejpa - |
| Herfried
Registered User |
Thu Dec 02 02:24:03 CST 2004
Re:Option Strict and reading bytes from File
"Kejpa" <kSjPeAlMl@saj.fi>schrieb:
QuoteDim baInfo(99) As Byte \\\ FileGet(19, DirectCast(baInfo, Array), 5) /// -- M S Herfried K. Wagner M V P <URL:dotnet.mvps.org/>">dotnet.mvps.org/> V B <URL:dotnet.mvps.org/dotnet/faqs/>">dotnet.mvps.org/dotnet/faqs/> - |
| Kejpa
Registered User |
Thu Dec 02 02:39:24 CST 2004
Re:Option Strict and reading bytes from File
It worked, thanks a lot!
Do you have anything like it up the sleeve for reading structs? I have the same problem there... TIA /Kejpa "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at>wrote in message Quote"Kejpa" <kSjPeAlMl@saj.fi>schrieb: - |
