Answers

Files is a string so the foreach statement is trying to loop through each char in Files (so you get an error when an attempt is made to set F to a char). You want Files to be an enumerable or Array. Try:

All replies

Files is a string so the foreach statement is trying to loop through each char in Files (so you get an error when an attempt is made to set F to a char). You want Files to be an enumerable or Array. Try:

For the first error, the variable Files should not be declared as string. Based on the following code I assume you want to go through the files, therefore you need a list of paths (what I assume should be stored in Files), so
try to get a variable of the type string[].

For the second error, just erase the return or break statement (depends on what you need). The part of code that can not be reached is
break because the return statement always ends the function .