I concur with SJWhiteley. You need to first decide exactly what it is and exactly how you want the data stored. You can then use a BinaryWriter to write binary data to a file and a BinaryReader to read binary data from a file. They provide methods for working with standard .NET types, i.e. you can read and write Integers, Strings, Booleans, DateTimes, Bytes (singular and arrays) and more.
Let's say that you decided that your file format would be a String followed by two Integers. You could write out a file like this:
vb.net Code:
Private Sub WriteToFile(filePath As String, text As String, number1 As Integer, number2 As Integer)
Using file As New FileStream(filePath, FileMode.OpenOrCreate, FileAccess.Write),
writer As New BinaryWriter(file)
With writer
.Write(text)
.Write(number1)
.Write(number2)
End With
End Using
End Sub
Private Sub ReadFromFile(filePath As String, ByRef text As String, ByRef number1 As Integer, ByRef number2 As Integer)
Using file As New FileStream(filePath, FileMode.Open, FileAccess.Read),
reader As New BinaryReader(file)
With reader
text = .ReadString()
number1 = .ReadInt32()
number2 = .ReadInt32()
End With
End Using
End Sub
Note that the second method might throw an exception if the file is in the wrong format or it might just return nonsensical data. For that reason, it might not be a bad idea to define a small header that all files of your format have. It still doesn't guarantee anything but it makes telling the difference between a corrupt file and one in the wrong format easier.