Question: I am trying to exclude files which end with the ".done" extension in a case insensitive manner (no matter whether its .done, .DONE, .Done etc).

I am using this function:

```
 Dim filesFromDownloadFolder = Directory.GetFiles(_chorusPath & ReportPaths.Download).Where(Function(name) Not name.EndsWith(".done", True))

```

but after i got this error appear:

```
The string comparison type passed in is currently not supported.  Parameter name: comparisonType

```

i guess i should instead of true put StringCompariision.something but i am not sure which of available option in my case.

Answer: 
You're attempting to set the ignoreCase parameter to True, but the only overload providing this option also expects a third parameter. You are instead setting The ComparisonType parameter to True, hence your error. Try instead the following, which will set a StringComparison:

```
Dim filesFromDownloadFolder = Directory.GetFiles(_chorusPath & ReportPaths.Download).Where(Function(name) Not name.EndsWith(".done", StringComparison.OrdinalIgnoreCase))

```
you are try to filter the directory with a file extension, why are you using linq
use the native method it is fast too

[Directory.GetFiles Method (String, String)](https://msdn.microsoft.com/en-us/library/wz42302f(v=vs.110).aspx "Directory.GetFiles Method (String, String)")

**EDIT**

Sorry for the wrong info i didn't Read the question completly, my mistake
but still it seems Getfiles is not the right solution, if the user using .NET 4 and above then user can use 

[Directory.EnumerateFiles Method (String)](https://msdn.microsoft.com/en-us/library/dd383458(v=vs.100).aspx "Directory.EnumerateFiles Method (String)")
It is faster than the getfiles