VB Types in VB.Net

  • Thread starter Thread starter Rob Blackmore
  • Start date Start date
R

Rob Blackmore

Hi,

Can anyone let me know the best way to mimic the behaviour of VB Types
in VB.Net. I want to define a structure and then load / save data
into it from a binary file using FOPEN / FREAD etc... so I need to be
able to specify the size of the fields (mostly text). From what I can
see of the structure operator you cannot specify the size. I could
write code to manipulate a byte array of a stream object but don't
think that it should be that complex for what was a two line solution
in VB 6.0?


Thanks

Rob
 
Rob Blackmore said:
Can anyone let me know the best way to mimic the behaviour of VB Types
in VB.Net. I want to define a structure and then load / save data
into it from a binary file using FOPEN / FREAD etc... so I need to be
able to specify the size of the fields (mostly text). From what I can
see of the structure operator you cannot specify the size. I could
write code to manipulate a byte array of a stream object but don't
think that it should be that complex for what was a two line solution
in VB 6.0?


See if this section helps:

http://msdn.microsoft.com/library/en-us/vbcn7/html/vaconDeclaringVariablesForRandomFileAccess.asp

LFS
 
Back
Top