title: How to modify properties of the incoming object without creating a new instance?
body: <p>I would like to modify properties of the incoming object. How to do this without creating a new instance?</p>
  
  <p>I have a class </p>
  
  <pre><code>public class Report : IReport&lt;ReportItem&gt;
  {
      public Report()
      {
          Items = new ReportItemsCollection();
      }
  
      public Report(IEnumerable&lt;ReportItem&gt; items)
      {
          Items = new ReportItemsCollection(items);
      }
  
      [DataMember(Name = "items")]
      public ReportItemsCollection Items { get; private set; }
  
      IEnumerable&lt;ReportItem&gt; IReport&lt;ReportItem&gt;.Items
      {
          get { return Items; }
      }
  }
  </code></pre>
  
  <p>and two methods</p>
  
  <pre><code>private static Report ConvertReportItems(Report report)
  {
      var reportData = report.Items.Select(BackwardCompatibilityConverter.FromOld);
      return new Report(reportData);
  }
  
  public static ReportItem FromOld(ReportItem reportItem)
  {
      reportItem.AgentIds = new List&lt;Guid&gt; { reportItem.AgentId };
      reportItem.AgentNames = new List&lt;string&gt; { reportItem.Agent };
  
      return reportItem;
  }
  </code></pre>