title: How to get some elements from array which contain some specific text and dont duplicate it?
body: <p>I have an array of file paths and I want to create array that contains only uniqe files in paths_after array. Files is always starting at "OpenShop_".</p>
  
  <p>Example: C:\aaa\OpenShop_F.dll; C:\aaa\vvv\OpenShop_F.dll; C:\aaa\OpenShop_E.dll</p>
  
  <p>I have that code:</p>
  
  <pre><code>string[] paths = Directory.GetFiles(path, "OpenShop*.dll",SearchOption.AllDirectories);            
  string[] endpaths;
  endpaths = paths.Where(x=&gt;Path.GetFileName(x).Contains("OpenShop_")).Distinct().ToArray();
  </code></pre>
  
  <p>I want to in endpaths array elements with unique filenames: c:\aaa\OpenShop_F.dll
  c:\aaa\OpenShop_E.dll</p>
  
  <p>And I have result: 
  <img src="https://i.stack.imgur.com/YyGCe.png" alt="Result"></p>
  
  <p>I dont want the same dll's. I want only one OpenShop_Firefox.dll only one Chrome and only one IE.</p>