Arraylist in property

rbharris

Member
Joined
May 26, 2006
Messages
14
Programming Experience
Beginner
I'm trying to create a property to accecpt an arraylist.
Actually, what I want to do is be able to add multiple values to a propery for an email To: field in the event there will be more than one recipient.

I thought that I would create a class called email and within that class there is property call Recipient. I would like Recipient to be capable of holding more than one recipeint value.

I am not sure what the best method would be.

I just realized that my idea wouldn't work, any way because TO.Add only supports one string. I would have to add multple to.add methods for multiple addresses. I'm not sure how to handle this.
 
Last edited:
There is already a MailMessage class in the System.Net.Mail namespace, its To property is of type MailAddressCollection which accepts multiple instances of type MailAddress class.
 
Back
Top