[protobuf] Re: Missing has method for optional fields in proto3 ?

2017-09-15 Thread 次华李
If you need a field which is "an int32 value, or not set" you can use the google.protobuf.Int32Value message type. In proto file,Which field type I can use? 在 2015年7月17日星期五 UTC+8下午9:10:29,Jon Skeet写道: > > On Friday, 17 July 2015 02:34:21 UTC+1, Wu XIANG wrote: >> >> >> Is it true that

[protobuf] Re: Missing has method for optional fields in proto3 ?

2015-07-17 Thread Jon Skeet
On Friday, 17 July 2015 02:34:21 UTC+1, Wu XIANG wrote: Is it true that has methods for optional fields in proto3 are removed from generated message ? For primitive types, yes. If so, how can I decide if this field has been set or not ? You can't. An int32 field that's been set to