protobuf 的东西,完全整不明白了!解决办法

protobuf 的东西,完全整不明白了!急啊!!!!!!!!!!Dim rpcResponse As New GetPubKey.RpcResponserpcRespons

protobuf 的东西,完全整不明白了!急啊!!!!!!!!!!

  Dim rpcResponse As New GetPubKey.RpcResponse

  rpcResponse = ProtoBuf.Serializer.DeserializeWithLengthPrefix(Of RpcResponse)(Stream, ProtoBuf.PrefixStyle.Base128, Stream.Length)


  Console.WriteLine("收到了!" & rpcResponse.flag)//这里出错"未将对象引用设置到对象的实例。"

可是明明是有引用到实例了"Dim rpcResponse As New GetPubKey.RpcResponse"

谁能告诉我怎么操作protobuf,进行接口数据传递啊!!!!

[解决办法]
ProtoBuf.Serializer.DeserializeWithLengthPrefix(Of RpcResponse)(Stream, ProtoBuf.PrefixStyle.Base128, Stream.Length)

为 Nothing
[解决办法]
增加:
if rpcResponse is not Nothing then
Console.WriteLine("收到了!" & rpcResponse.flag)
end if