I'm wondering what is a fast and proper way if I got list about 2000 string values: 

```
 List<string> strList = new List<string>();  

```

For example:

```
for (int i = 1; i <= 2000; i++)
{
    strList.Add("a" + i);
}

```

and I want replace each for input string if equal value is found:

```
string inputStr = "a1 a5 a80 a80 m124 a34 a300 e12 s00";

```

and if any word exist in strList of two thousand values, for example `if (strList.Any(inputStr.Contains))` then I want `inputStr.Replace` with `""` empty space then desired output should be::

```
"m124 e12 s00";

```

**EDIT:**

As my priority is to make this replacement fast as much it is possible, I've tried to compare `ElapsedMilliseconds` results of given solutions by Slai and sxmlln below. Both completely answered on my question and results is second:

*2000 values:* 

```
string inputStr = "a1 a5 a80 a80 m124 a34 a300 e12 s00";

```

result:

```
ISet<String> : time: [ 0 ] fast
List<string> : time: [ 5 ] slow
HashSet<string> : time: [ 1 ] average

```

sometimes equal with same string and content:

```
ISet<String> : time: [ 0 ] fast
List<string> : time: [ 5 ] slow
HashSet<string> : time: [ 0 ] fast

```

*8000 values:* 

```
string inputStr = "a1 a5 a80 a80 m124 a34 a4987 a300 e12 s00";

```

result:

```
ISet<String> : time: [ 2 ] fast
List<string> : time: [ 5 ] slow
HashSet<string> time: [ 3 ] average

```

*20000 values:* 

```
string inputStr = "a1 a5 a80 a80 m124 a34 a4987 a17890 a300 e12 s00";

```

result:

```
ISet<String> : [ 7 ] fast
List<string> :  [ 12 ] average
HashSet<string> : [ 16 ] slow

```

*200000 values:*

```
string inputStr1 = "a1 a5 a80 a80 m124 a34 a4987 a17890 a300 e12 s00 a123676";

```

result:

```
ISet<String> : [ 105 ] fast
List<string> :  [ 111 ] average
HashSet<string> : [ 142 ] slow

```

`ISet<String>` is always less then `List<string>` and less or equal to `HashSet<string>`. And `List<string>` becomes faster then `HashSet<string>` after larger amount of values, but before this certain amount it is slower then `HashSet<string>` with `ElapsedMilliseconds` results.