user1544394
user1544394

Reputation: 23

How to write a "List(Of object) to a file in VB.NET?

I have a class like this

Public Class alink
    Public url As String
    Public id As Integer
    Public linksto As New List(Of Integer)()
End Class

which is declared like this..

Public thelinklist As New List(Of alink)()

My question is how to go about writing and reading this list to file?

Im not sure what approach to use at all really!

Upvotes: 2

Views: 3895

Answers (1)

LeleDumbo
LeleDumbo

Reputation: 9340

Depends on how you want the file to be used, if it's only for storing/loading the objects and need not to be human readable, you could use serialization.

Upvotes: 1

Related Questions