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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top