Hello,
I have successfully compiled my .proto file with google.proto.Timestamp and
generated the .cs file with protoc. The only problem i am having is
initialization in my c# code.
I have tried the following ,
*.proto File*
message teststamp{
string Name = 1 ;
string address = 2;
google.protobuf.Timestamp _timeStamp = 3;
}
*C# File*
teststamp test = new teststamp();
test.Name = "Test";
test.address = "Test_Test_TEST"
//Example 2 : POSIX
test._timeStamp.Seconds = DateTime.Now.Second;
test._timeStamp.Nanos = DateTime.Now.Second*1000 ;
The above is compiling without errors but giving me this error "Object
reference not set to an instance of an object" .I have tried few other
approaches but due to less help it is unable to fix the error.
Please help me out in this issue
Thanks
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.