Cannot be serialized because it does not have a parameterless constructor

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
An unhandled exception of type System.InvalidOperationException occurred in System.Xml.dll
<br/>

Additional information: Server.Scripts.Mobile cannot be serialized because it does not have a parameterless constructor.
<br/>

My code looks like:

XmlSerializer mySerializer =
new XmlSerializer(typeof(Mobile));

<br/>

Mobile must have parameters, how can I fix this?

View the full article
 
Back
Top