Protocol Buffers c# (protobuf-net) Message::ByteSize
问题 I am looking for the protobuf-net equivalent to the C++ API Message::ByteSize to find out the serialized message length in bytes. 回答1: I haven't played with the C++ API, so you'll have to give me a bit more context / information. What does this method do? Perhaps a sample usage? If you are consuming data from a stream, there are "WithLengthPrefix" versions to automate limiting to discreet messages, or I believe the method to just read the next length from the stream is on the public API. If