How to write collection of all items at a time into mail?


#1

Hi,

Iam trying to write a collection of responsibilities as a single variable into mail.But getting an error message that + operator can’t be used for collection of itemsin the attached image, resps variable is a collection holding two or more values.While writing to email i need to all the values…can anyone help me solve this error.error


#2

I think this should work

String.Join(Environment.NewLine,resps) --> New line

String.Join(",",resps) --> Comma Saperated


#3

hi @vvaidya

It is not working.It is displaying the type of collection as a string format message.In the place of that collection type name.values of the collection need to be displayed
error2t.


#4

Hi @vslp_uipc,

String.join(Environment.NewLine,resps.ToArray)

Regards,
Arivu


#5

I was thinking Ienumerable(Match), this should work.

String.Join(Environment.NewLine,resps.Cast(Of Match).Select(Function(s) s.Value).ToArray)

Thanks,
Vinay


#6

thank you @vvaidya. it is working:)

Regards,
padmaja