title: C# Inheritance: How to invoke the base class constructor when i call the derived class constructor
body: <p>I am trying to figure out how to invoke a base class constructor when I call the derived class constructor.</p>
  
  <p>I have a class called "AdditionalAttachment" which is inherited from System.Net.Mail.Attachment.I have added 2 more properties to my new class so that i can have all the properties of existing Attachment class with my new properties</p>
  
  <pre><code>public class AdditionalAttachment: Attachment
  {
     [DataMember]
     public string AttachmentURL
     {
         set;
         get;
     }
     [DataMember]
     public string DisplayName
     {
         set;
         get;
     }
  }
  </code></pre>
  
  <p>Earlier i used to create constructor like</p>
  
  <p>//objMs is a MemoryStream object</p>
  
  <pre><code>Attachment objAttachment = new Attachment(objMs, "somename.pdf")
  </code></pre>
  
  <p>I am wondering how can I create the same kind of constructor to my class which will do the same thing as of the above constructor of the base class</p>