Never mind, found something better. Didn't think it would work, but it does,
and it's apparently tread-safe, too.
Paul
Private Class Serializer
Inherits Xml.Serialization.XmlSerializer
Private Sub New()
MyBase.new(GetType(Contract), New XmlRootAttribute("Contract"))
End Sub
Private Shared ReadOnly StaticInstance As New Serializer
Public Shared Function GetNew() As Serializer
Return DirectCast(StaticInstance.MemberwiseClone, Serializer)
End Function
End Class
"PJ6" <no***@nowhere.netwrote in message
news:Oa**************@TK2MSFTNGP06.phx.gbl...
The compiler only pays attention to the "generate serialization assembly"
option in release mode. I'd quite rather have this working in debug as
well... is that possible?
Paul