Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

constructor in protobuf-net

[ProtoContract(SkipConstructor=true)]
public class ContainerForA
{
    [ProtoMember(3)]
    public IBaseA InstanceOfA { get; set; }

    public ContainerForA()
    {
        InstanceOfA = new ClassA();
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #constructor
ADD COMMENT
Topic
Name
2+7 =