title: How Fill new List object in C# with values
body: <p>I have a phone object in C# that is returning (Home, work and phone Number) I like to fill another object with this values that has List of Phones that has Number and Type.
  I write this code:</p>
  <p>&quot;patientUpdateInfo.phone&quot; is the object that I am filling the phone:</p>
  <pre class="lang-cs prettyprint-override"><code>private List&lt;PhoneUpdateInfo&gt; phones { get; set; } = new List&lt;PhoneUpdateInfo&gt;();
  
  if (patientbyId.home_phone != null)
    { 
      foreach (var phone in phones)
      {
          phone.Number = patientbyId.home_phone;
          phone.Type = PhoneType.Home;
          patientUpdateInfo.Phones.Add(phone);
      }
  }
  </code></pre>
  <p>and this in PhoneUpdateInfo object:</p>
  <pre class="lang-cs prettyprint-override"><code>public class PhoneUpdateInfo
  {
      public PhoneUpdateInfo()
      {
          Type = Data.PhoneType.Home;
      }
      public Data.PhoneType Type { get; set; }
      public string Number { get; set; }
  }
  </code></pre>
  <p>my problem is this line:  foreach (var phone in phones) because the phone object is Empty( New object) it does not go inside the look to fill the object it will pass the foreach loop. What should I do?</p>