How can i return List of directories instead of url's?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/13058827/how-can-i-get-a-string-and-return-each-time-a-string-from-array">How can i get a string and return each time a string from array?</a>  </p>
</blockquote>



<p>I have this function :</p>

<pre><code>private List&lt;string&gt; getLinks(HtmlAgilityPack.HtmlDocument document)
        {

            List&lt;string&gt; mainLinks = new List&lt;string&gt;();
            var linkNodes = document.DocumentNode.SelectNodes("//a[@href]");
            if (linkNodes != null)
            {
                foreach (HtmlNode link in linkNodes)
                {
                    var href = link.Attributes["href"].Value;
                    if (href.StartsWith("http://") == true || href.StartsWith("https://") == true || href.StartsWith("www") == true) // filter for http 
                    {
                        mainLinks.Add(href);
                    }
                }
            }

            return mainLinks;

        }
</code></pre>

<p>Its getting one url and return list of url's.
Instead i want that the function will get a directory for example c:\
And it will return me a List of all directories in c:\ 
Not subsirectories just the directories in c:\ in my case it should be a List with a 14 directories.</p>

<p>Meaning in each index in the List a directory.</p>

<p>How can i do it ? Tried with Directory and DirectoryInfo but i just got messed up.</p>
