title: Copy the content one IEnumerable to another after checking the index of each record
body: <p>I want to copy the record from one IEnumerable to another after checking the index of the record. pvm consists of set of records with n number of columns and m number of rows. In view_filter method i am checking index. If the condition holds good I want to copy record to _invMstrSrchResults. Index gets checked one by one.</p>
  
  <pre class="lang-cs prettyprint-override"><code>        public PagingViewModel(IEnumerable&lt;InventoryMasterItem&gt; pvm)
          {            
              ViewList = new CollectionViewSource();
              ViewList.Source = pvm;
              ViewList.Filter += new FilterEventHandler(view_Filter);
  
              CurrentPageIndex = 0;
              itemcount = 100;
              CalculateTotalPages();            
          }
  
          private IEnumerable&lt;InventoryMasterItem&gt; _invMstrSrchResults;
  
          void view_Filter(object sender, FilterEventArgs e)
          {
              int index = ((InventoryMasterItem)e.Item).indexNo - 1;
              if (index &gt;= itemPerPage * CurrentPageIndex &amp;&amp; index &lt; itemPerPage * (CurrentPageIndex + 1))
              {
                   // I want to copy record from pvm to _invMstrSrchResults here
                   e.Accepted = true;               
              }
              else
              {
                  e.Accepted = false;
              }
          }
  </code></pre>