We are having to extend the System.Net.Mail namespace and need some help
with coding it.
We have added several properties to System.Net.Mail.Attachment and need to
add our several of them to System.Net.Mail.MailMessage.Attachments.
// public AttachmentCollection Attachments { get; }
How do we override AttachmentCollection to be a collection of
OurNamespace.Attachments?
How then do we override MailMessage to be the above collection?
public class MailMessage : System.Net.Mail.MailMessage
{
public MailMessage()
{
}
private int _shipmentID;
public int ShipmentID
{
get { return _shipmentID; }
set { _shipmentID = value; }
}
private int _shipmentEmailsID;
public int ShipmentEmailsID
{
get { return _shipmentEmailsID; }
set { _shipmentEmailsID = value; }
}
// overide attachments
public override ?
}
public class Attachment : System.Net.Mail.Attachment
{private int _documentsID;
public int DocumentsID
{
get { return _documentsID; }
set { _documentsID = value; }
}
}