syntax = "proto3";
import "google/protobuf/wrappers.proto";
message Sample {
// this will throw if you don't pass at least an empty string in generated C# code
optional string not_nullable = 1;
// this wrapper generates `string?` in C# (as one would expect)
google.protobuf.StringValue nullable = 2;
}
That's all. Hopefully this saves you some WTFs/minute.
Top comments (1)
This is good to know, pretty sure it will become handy someday, thanks!