Hi. In dos based c++,i've done something like reading/writing a structure to a file. Is this possible with VB.NET? I've would like to save an object(probably a class) or even multiple object to a file and retrieve it's binary data and cast it back to an object.

For eg. if i have a class:

Public Class Student
Public Name As String
Public Age As Integer
Public DateOfBirth As Date
Public Religion As ReligionConstant
End Class

And I have few objects of the Student:

Dim Matty As New Student()
Dim Steven As New Student()
Dim Jay As New Student()

Matty.Name = "Matty"
Matty.Age = 12
Matty.DateOfBirth = "#12/5/2003#"
Matty.Religion = ReligionConstant.Christian

Steven.Name = "Steven"
Steven.Age = 21
Steven.DateOfBirth = "#12/5/2003#"
Steven.Religion = ReligionConstant.Christian

Jay.Name = "Jay"
Jay.Age = 35
Jay.DateOfBirth = "#9/9/2003#"
Jay.Religion = ReligionConstant.Christian

I would like to save these information into a file using binary format (not text) and need to know how to read these info and cast it back to an object. Thanks in advance.

Archaven