I have a problem using Option strict with user defined variables. I have a variable ModelInfo which is defined with a structure statement i.e

Public Structure ModelInfo
….
….
….
End Structure

The variable is declared and is stored in a random access file i.e.

Public ModelData as ModelInfo
FileOpen(1, FileName, OpenMode.Random, , , Len(ModelData))

The FilePut and FileGet statements work OK with Option Strict Off, however with Option Strict On the following FileGet statement returns an error.

FileGet(1, ModelData, 1)

Can anyone advise why this is?

Thanks