"Larry Rebich" <lrebich@earthlink.net> wrote:
>How do you Serialize? I have never used this! Do you have a sample?

Here's a sample.

Imports System.IO
Imports System.Runtime.Serialization.Formatters.Soap

Module Module1

Sub Main()
Dim op As New Options()
op.ListboxSetting = 5
op.DefaultFilePath = "C:\New Folder"

Dim stream As FileStream = File.Create("Options.xml")
Dim xml As SoapFormatter = New SoapFormatter()

xml.Serialize(stream, op)


stream = File.OpenRead("Options.xml")
Dim xml_op As Options = CType(xml.Deserialize(stream), Options)

Console.WriteLine(xml_op.ListboxSetting & " " & xml_op.DefaultFilePath)
End Sub

End Module

<Serializable()> Public Class Options
Private _ListBoxSetting As Integer
Private _DefaultFilePath As String

Public Property ListboxSetting() As Integer
Return _ListBoxSetting
End Get
Set(ByVal Value As Integer)
_ListBoxSetting = Value
End Set
End Property

Public Property DefaultFilePath() As String
Return _DefaultFilePath
End Get
Set(ByVal Value As String)
_DefaultFilePath = Value
End Set
End Property
End Class