I have a function of List<string> that get string,int how can i use it to work?
<p>Edited:
Im trying to make recursive:
In the top of Form1 i have:</p>

<pre><code>List&lt;string&gt; webSites = new List&lt;string&gt;();
        List&lt;string&gt; csFiles = new List&lt;string&gt;();
</code></pre>

<p>In the constructor i have:</p>

<pre><code>webCrawler(url, 2); 
</code></pre>

<p>Then i have the function getLinks:</p>

<pre><code>private void getLinks()
        {
            foreach (HtmlNode link in doc.DocumentNode.SelectNodes("//a[@href]"))
            {
                var href = link.Attributes["href"].Value;
                richTextBox1.Text += href + Environment.NewLine;
                webSites.Add(href);
            }
        }

private List&lt;string&gt; test(string url, int levels)
            {
                doc = hw.Load(url);
                getLinks();
                if (levels == 0)
                {
                    return csFiles;
                }
                else
                {
                    for (i = 0; i &lt; webSites.Count(); i++)
                    {

                        string t = webSites[i];
                        var f = levels * test(url, levels - 1);

                    }
                }
                return csFiles;
            }
</code></pre>

<p>webSites and csFiles are both List and levels is int. 
The problem is that on the line: <code>var f = levels * test(url, levels - 1);</code>
On the right side im getting error: Error Operator '*' cannot be applied to operands of type 'int' and 'System.Collections.Generic.List</p>

<p>How can i fix it ?</p>

<hr>

<p>In the function test i also call the function getLinks()
I also need to make a function for the cs files that will take out from each site only .cs files and in the end in the test function i need to return the csFiles list.</p>
