ProtoBuf-net Deserialize does not work
问题 code is here: var responseMsg = new ResponseMessage() { code = ErrorCode.OK, type = MsgType.LOGIN, responseStr = "this is local server" }; var serverStream = new MemoryStream(); ProtoBuf.Serializer.Serialize(serverStream, responseMsg); Console.WriteLine($"responseMsg {responseMsg?.responseStr ?? "failed"}\n"); var response =ProtoBuf.Serializer.Deserialize<ResponseMessage>(serverStream); Console.WriteLine($"response {response?.responseStr ?? "failed"}\n"); result is responseMsg this is local