Unable to use String.Format() function in mailMessage.Body

Hi all,

Sorry if this have been asked.
I tried to assign mailMessage.Body with String.Format(textfile, value0, value1) but it come up with below error :

Assign : Value cannot be null.
Parameter name: format

image

I am not sure. I have check textfile, value0 and value1 data, it is giving output.
When I assigned mailMessage.Body with single string (e.g textfile, value0 or value1), it worked. But not able to use using String.Format. Any idea guys?

EmailAttachment.xaml (15.9 KB)

Thanks!

You need give it as String.Format(“{0} {1} {2}”, textfile, value0, value1)

Because syntax is String.Format(“format string”, arg1 , arg2 , … )

1 Like

Yes understand that. Thanks Vivek.

1 Like

Sorry guys. Just notice that my “Out” arg didnt properly declared. Sorry for inconveniences.

1 Like