Public Class Form1
Inherits System.Windows.Forms.Form
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim cfl As New ArrayList()
cfl.Add(New SimpleDate())
cfl.TrimToSize()
Dim ser As XmlSerializer = New XmlSerializer(GetType(ArrayList))
Dim writer As TextWriter = New StreamWriter("adminSettings.xml")
ser.Serialize(writer, cfl)
writer.Close()
End Sub
End Class
<Serializable()>Public Class SimpleDate
Public SimpleDate As DateTime
End Class