C# listbox,params
<p>As <strong>Andrew Hare</strong> suggested in <a href="http://stackoverflow.com/questions/2744332/c-listboxs-as-one-objectcontainer/2744350#2744350">his answer</a>:</p>

<blockquote>
  <p>Create a field to store all the
  ListBox instances and then change the
  constructor to accept an arbitrary
  number of them.</p>
</blockquote>

<p>I tried the following </p>

<pre><code>class scaner
{
    readonly IEnumerable&lt;ListBox&gt; listBoxes;

    public IEnumerable&lt;ListBox&gt; ListBoxes
    {
        get { return this.listBoxes; }
    }

    public scaner(params ListBox[] listBoxes)
    {
        this.listBoxes = listBoxes;    
    }
}
</code></pre>

<p>This will allow you to do this:</p>

<pre><code>scaner Comp = new scaner(listBox1, listBox2);
</code></pre>

<hr>

<p><em><strong>How can i access listbox1?</em></strong></p>

<p>In class scaner i'm trying to call   <code>this.listBoxes. </code> <br>
(I need to call the listbox1 in scaner class.How can i do/call it?</p>

<p>Thanks for answers.</p>
