6.Protobuf Message数据类型对应C#的数据类型

看一段.proto文件里的Message,它们在C#里面对应的是什么类型?

message Person {
int32 id = 1;
string first_name = 2 // FirstName
string last_name = 3;
}

 

Protobuf 类型
C# 类型 
double
double
float
float
int32 
int
int64 
long
uint32 
uint
uint64 
ulong 
sint32
int 
sint64
long
fixed32 
uint
fixed64 
ulong
sfixed32 
int
sfixed64 
long
bool
bool
string
string
bytes
ByteString
google.protobuf.Timestamp 
DateTimeOffset
google.protobuf.Timestamp 
DateTime
google.protobuf.Duration 
TimeSpan

 

posted @ 2024-02-18 10:44  野码  阅读(48)  评论(0编辑  收藏  举报