Comparing two hashsets
<p>I have two hashsets that are loading data from two different text files.
The contents of both text files look as follows:</p>

<pre><code>name/12441431252132
name1/323244231244142
name2/32423452524234
</code></pre>

<p>My code to currently load both files and make sure i only have unique results from textFile2:</p>

<pre><code>HashSet&lt;string&gt; txt1 = new HashSet&lt;string&gt;(File.ReadLines("textFile1.txt"));
HashSet&lt;string&gt; txt2 = new HashSet&lt;string&gt;(File.ReadLines("textFile2.txt"));

txt2.ExceptWith(txt1); 
</code></pre>

<p>My problem is that it only removes lines based on the criteria if the whole line matches. I want to remove It based on the name basis instead. For example, name2 should never be included if its in textFile1 even if the id's after the / are different. </p>

<p>How would i accomplish this?</p>

<p>Let me know if my explanation is not good i will try to improve it - and please excuse my english!</p>
