title: What does the ProtoInclude attribute mean (in protobuf-net)
body: <p>In the <a href="http://code.google.com/p/protobuf-net/" rel="nofollow noreferrer">ProtoBuf-Net</a> implementation, what does the <strong>ProtoInclude</strong> attribute mean, and what does it do?</p>
  
  <p>An example would be appreciated.</p>
  
  <p>I saw it <a href="https://stackoverflow.com/questions/675349/deserialize-unknown-type-with-protobuf-net">in this post</a> and I'm not sure what it does. The example was:</p>
  
  <pre><code>[Serializable,
   ProtoContract,
   ProtoInclude(50, typeof(BeginRequest))]
  abstract internal class BaseMessage
  {
    [ProtoMember(1)]
    abstract public UInt16 messageType { get; }
  }
  
  [Serializable,
   ProtoContract]
  internal class BeginRequest : BaseMessage
  {
      [ProtoMember(1)]
      public override UInt16 messageType
      {
          get { return 1; }
      }
  }
  </code></pre>
  
  <p>Also, is there a way to generate such inheritance using the <strong>protogen</strong> tool?</p>