C# AsEnumerable Function
<pre><code>private ArrayList NumberElimination(ArrayList array2,int index) {
    ArrayList array4 = new ArrayList();
    int number = 0;

        for (int counter = 0; counter &lt; array2.Count; counter++)
        {
            ArrayList array3 = new ArrayList();
            array3 = Split(array2[counter].ToString());
            for (int k = 0; k &lt; index; k++)
            {
                result = data.AsEnumerable().Where(r =&gt; r.ItemArray.Contains(array3[k].ToString()));//Database query...
            }

            foreach (DataRow row2 in result)
            {
                number++;
            }
            array4.Add(number);
            number = 0;
        }
    return array4;
}
</code></pre>

<p>I coding a function..The Function;</p>

<pre><code>for example
ArrayList=('a','b')
datarow1=('c','e','b','a')---&gt;true
datarow2=('c','e','g','a')---&gt;false
datarow3=('a','e','b','g')---&gt;true
and As a result number=2
</code></pre>

<p>..</p>

<pre><code>I have a problem..Now:

 for (int k = 0; k &lt; index; k++)
            {
                result = data.AsEnumerable().Where(r =&gt; r.ItemArray.Contains(array3[k].ToString());//Database query...
            }
</code></pre>

<p>In this section,
I want to be;
for index=2</p>

<pre><code>      result = data.AsEnumerable().Where(r =&gt; r.ItemArray.Contains(array3[0].ToString()) &amp;&amp; r.ItemArray.Contains(array3[1].ToString()));//Database query...
</code></pre>

<p>for index=3</p>

<pre><code>result = data.AsEnumerable().Where(r =&gt; r.ItemArray.Contains(array3[0].ToString()) &amp;&amp; r.ItemArray.Contains(array3[1].ToString()  &amp;&amp; r.ItemArray.Contains(array3[2].ToString()));//Database query...
</code></pre>

<p>for index=4</p>

<pre><code> result = data.AsEnumerable().Where(r =&gt; r.ItemArray.Contains(array3[0].ToString()) &amp;&amp; r.ItemArray.Contains(array3[1].ToString()  &amp;&amp; r.ItemArray.Contains(array3[2].ToString() &amp;&amp; r.ItemArray.Contains(array3[3].ToString()));//Database query...
</code></pre>

<p>I hope to explain my problem...
Any İdea for this...</p>
