I am trying to figure out how to call the constructor of the base class when calling the constructor of the derived class.
I have a class called "AdditionalAttachment" that is inherited from System.Net.Mail.Attachment. I added 2 more properties to my new class so that I have all the properties of the existing Attachment class with my new properties
public class AdditionalAttachment: Attachment { [DataMember] public string AttachmentURL { set; get; } [DataMember] public string DisplayName { set; get; } }
I used to create a type constructor
// objMs - MemoryStream object
Attachment objAttachment = new Attachment(objMs, "somename.pdf")
I am wondering how I can create the same constructor for my class that will do the same as the above base class constructor
inheritance constructor c #
Shyju
source share