How can you serialize anonymous type with C # protobuf-net?

using ProtoBuf;

    var anon = new { Id = Guid.NewGuid(), Name = "Yan", Age = 29 };        

Serializer.Serialize(anon.ToString(), anon.GetType().BaseType);

      

Is it possible to serialize anonymous types in C # using protobuf-net? The above is a simplification of the script

Actually I have a stream of message signatures like (string message, data of anonymous type, string secondMessage);

+3


source to share





All Articles