Merrion
Well-known member
Any ideas how I might read a structure from a file stream? ideally Im looking for something that is like Marshal.PtrToStructure but instead of an unmanaged memory address I pass a file stream handle?
TransactionRecordType As Int32
TransactionRecordSize As Int32
Public Class TransactionHeaderRecord
Private _RecordType As Int32
Private _RecordSize As Int32
Public Sub New(ByVal InFile As BinaryStreamReader)
_RecordType = InFile.ReadInt32
_RecordSize = InFile.ReadInt32
-- other fields go here...
End Sub
End Class