Is there a way of getting only two specific file formats from a directory? I am currently attempting to read .docx and .pdf from a folder with Directory.GetFiles but there is a validation error:
This is a good idea, but we have agreed with the client that we are using only .docx and .pdf formats, so I shouldn’t need to set an array in the beginning. Thank you for this though.