Fixed a bug in CSharp SampleUsage.
This commit is contained in:
parent
8162451b72
commit
09d03dfc7e
1 changed files with 5 additions and 1 deletions
|
@ -57,7 +57,11 @@ namespace Google.Protobuf.Examples.AddressBook
|
|||
Person copy = Person.Parser.ParseFrom(bytes);
|
||||
|
||||
// A more streamlined approach might look like this:
|
||||
bytes = copy.ToByteArray();
|
||||
AddressBook book = new AddressBook
|
||||
{
|
||||
People = { copy }
|
||||
};
|
||||
bytes = book.ToByteArray();
|
||||
// And read the address book back again
|
||||
AddressBook restored = AddressBook.Parser.ParseFrom(bytes);
|
||||
// The message performs a deep-comparison on equality:
|
||||
|
|
Loading…
Add table
Reference in a new issue