This is a protobuf-net specific question. The answer to that depends on
what you want to do. And I should stress that using attribute decoration is
a lot simpler (and is what you get if you start from .proto). But basically:

    RuntimeTypeModel.Default
        .Add(type(Customer), false)
            .Add(1, "Id")
            .Add(3, "Name");

Etc - assuming that members Id and Name are defined. But there are lots
more options - for using specific formats, surrogates, factories,
callbacks, etc. So again - what do you want to do?
On 31 May 2013 18:16, "凌翔" <lingxiang2...@gmail.com> wrote:

> Please give me an example, thank you!
>
> --
> 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 protobuf+unsubscr...@googlegroups.com.
> To post to this group, send email to protobuf@googlegroups.com.
> Visit this group at http://groups.google.com/group/protobuf?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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 protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to