title: Use LINQ to compare two List based on the same class
body: <p>I have a class named User:</p>
  <pre><code> public class User
      {
          public int usedId { get; set; }
          public int time { get; set; }
      }
  </code></pre>
  <p>If I have two Lists based on this class:</p>
  <pre><code> List&lt;User&gt; signIn = new List&lt;User&gt;();
   List&lt;User&gt; signOut = new List&lt;User&gt;();
  </code></pre>
  <p>How can I get a list of the substractions between the signIn list time property and the signOut list time property when the userId is the same? For example if the signIn list has userId= 30 with time= 20 at any point in the list and signOut list has userId= 30 (same as signIn) with time 40, how can I add the substraction (40-20) to a list using linq when the userIds are the same?</p>