How do I create a list of filenames from a folder in C#
<p>I got a problem when i want to populate an array with the file names.</p>

<p>the code is:</p>

<pre><code> string [] arrays= {};
 String sdira= "path of the directory";

 foreach (string d in Directory.GetDirectories(sdira))
 {

   foreach (string f in Directory.GetFiles(d, "*.*"))`enter code here`
   {
     int j = 0;

     array[j++] = path.getfiles(f);
   }

 }
</code></pre>

<p>when i loop through array, the array contains nothing :(
so how to fill the array in this case? 
or any better solution :)</p>
