Items added to my custom list have the local scope
<p>I've created custom list:</p>

<pre><code>public class BList : IEnumerable&lt;Position&gt;
{
        private List&lt;Position&gt; positions = new List&lt;BPosition&gt;();
        public void Add(Position p)
        { this.positions.Add(p); }
        ...
}
</code></pre>

<p>Than this list is member of the class Invoice:</p>

<pre><code>public class Invoice : Record
{
        public BList Positions = null;
        public Invoice()
            : base()
        {
            Init();
            this.Positions = new BList(this);
        }
        ...
}
</code></pre>

<p>Now  in form constructor I populate collection of the Invoices and add positions to BList:</p>

<pre><code>foreach(Invoice invoice in this.invoices)
{
    // Load position for current invoice from the database
    List&lt;Position&gt; positionsTmp = new List&lt;Position&gt;();
    DB.LoadRecordset(positionsTmp, "id_invoice=3");
    // and add to invoice positions items
    positionsTmp.ToList().ForEach(p =&gt; invoice.Positions.Add(p));
}
</code></pre>

<p>List of the positions in each invoice is populated correctly.
But when I use list this.invoices in other functions in this same class each invoice has Position list empty (Count = 0). It looks like positions are added localy and when application leaves the constructor all previously added positions do BList are cleared.
How I can populate BList for each invoice to they was available in entire class ?</p>

<p>Thanks</p>
