How does protobuf-net handle readonly fields?
I use protobuf-net to serialize/deserialize my data. I have some rather simple classes, so that's no real problem. As far as I know, protobuf-net uses IL generation to create serialization/deserialization code. While I have readonly fields in my model, I wonder how is it possible to write to such a field with IL? I can plainly see it works well, but I don't know why... I've tried to spy it in the code, but it's a bit too complicated. My attempts to generate such code myself always result in IL validator errors. Actually, I can't get it to fail - at least, when generating in memory. Let's start