I am a protobuf-net beginner and have just installed v2r470, to be used
in my C#-WinForm application.
I get an "InvalidOperationException was unhandled" - "No serializer defined for type: System.Object" when serializing an ArrayList.
Serializable class:
[ProtoContract]
public class ProtoData
{
[ProtoMember(1)]
ArrayList list = new ArrayList();
public ProtoData()
{
list.Clear();
list.Add("Hello");
list.Add("World");
}
}
Serialization:
ProtoData pData = new ProtoData();
var file = File.Create("protodata.bin");
Serializer.Serialize<ProtoData>(file, pData); // <<----- error
What's missing here?