Sounds like some strange behaviour. Could you check the type of
this
like in the code below? Put a breakpoint in the vs and check out what thisType is. Maybe it gives a clue.
public string Serialize()
{
Type thisType = this.GetType();
[BREAKPOINT] var serializer = new XmlSerializer(thisType);
TextWriter writer = new StringWriter();
serializer.Serialize(writer, this);
return writer.ToString();
}
Good luck!