possible to generate a serialization assembly in debug mode?

  • Thread starter Thread starter PJ6
  • Start date Start date
P

PJ6

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
 
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
 
Back
Top