I came across some old code that was using the FileGet with binary access, it simply reads a count then reads a dimensioned structure array from the file, similar to this:
With Option Strict Off the code runs fine. With Option Strict On 'data' gets squiggly:
VB.NET:
Dim data(count) As structureType
FileGet(fnum, data)
Is it possible to do something about this? I know better alternatives exist like the BinaryFormatter, but still was just wondering.Option Strict On disallows narrowing from type 'System.Array' to type '1-dimensional array of structureType' in copying the value of 'ByRef' parameter 'Value' back to the matching argument.