Send email with two different attachments

I have to send one .csv attachment and .png attachment to email. I used the below expression but getting the error


Which language do you use?
If vb it should be as the following.

Directory.GetFiles(CSVPath,"*.*",SearchOption.AllDirectories).Where(Function(s) s.EndsWith(".csv") OrElse s.EndsWith(".png"))

It might be better to compare case-ignore.

Directory.GetFiles(CSVPath,"*.*",SearchOption.AllDirectories).Where(Function(s) s.ToLower.EndsWith(".csv") OrElse s.ToLower.EndsWith(".png"))


try to recreate your project C# mode.