title: Default Object being modified because of LINQ Query
body: <p>I'm doing the following code to filter a list of objects before it gets sent off to be printed.</p>
  
  <pre><code>Dim printList As New List(Of dispillPatient)
  For Each pat As dispillPatient In patList
      If (From meds In pat.Medication Select meds Where meds.Print = True).Count &gt; 0 Then
          Dim patAdd As New dispillPatient
          patAdd = pat
          patAdd.Medication = DirectCast((From meds In pat.Medication Select meds Where meds.Print = True).ToList, List(Of dispillMedication))
          printList.Add(patAdd)
      End If
  Next
  </code></pre>
  
  <p>What is happening is <code>patList</code>, which is my initial list, for every <code>dispillPatient</code> inside of it, that specific patients Medication object (which is another list), is being shorten to the list that is returned to the <code>patAdd</code> object.</p>
  
  <p>I think this has something to do with both the way that .NET makes the copy of my <code>pat</code> object when I do <code>patAdd = pat</code> and the LINQ query that I'm using. Has anyone had a similar issue before and\or what can I do to keep my initial list from getting truncated.</p>