How to Combine 2 List<MailMessage> Using Invoke Code Activity

How do I combine the contents of 2 separate List into a single List using the Invoke Code Activity?

MailMessages1, MailMessages2, MailMessages3 are defined as System.Collection.Generic.List<System.Net.Mail.MailMessages in my workflow.

MailMessges3 = MailMessages1 and MailMessages2

Thanks,
Randy

Hi,

Can you try the following expression?

MailMessages3= MailMessages1.Concat(MailMessages2).ToList()

Regards,

1 Like

Yoichi,

Your suggestion worked.

Thanks,

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.