Sorting string Arry
<pre><code>string[] fileEntries = Directory.GetFiles(Application.StartupPath + "/TrainedFaces/", "*.bmp", SearchOption.AllDirectories);

Array.Sort(fileEntries);
foreach (string fileName in (fileEntries))
{

LoadFaces = System.IO.Path.GetFileName(fileName);


trainingImages.Add(new Image&lt;Gray, byte&gt;(fileName));


}
</code></pre>

<p>Out Put is:</p>

<pre><code>[0] = "N:\\FaceRecProOV - Copy (2)\\FaceRecProOV\\bin\\Debug/TrainedFaces/1\\1.bmp"

[1] = "N:\\FaceRecProOV - Copy (2)\\FaceRecProOV\\bin\\Debug/TrainedFaces/2\\2.bmp"

[2] = "N:\\FaceRecProOV - Copy (2)\\FaceRecProOV\\bin\\Debug/TrainedFaces/2\\9.bmp"

[3] = "N:\\FaceRecProOV - Copy (2)\\FaceRecProOV\\bin\\Debug/TrainedFaces/3\\3.bmp"

[4] = "N:\\FaceRecProOV - Copy (2)\\FaceRecProOV\\bin\\Debug/TrainedFaces/4\\4.bmp"
</code></pre>

<p>So this Wrong</p>

<p>what i want is</p>

<blockquote>
  <p>[0] = "N:\FaceRecProOV - Copy
  (2)\FaceRecProOV\bin\Debug/TrainedFace/1\ <strong>1.bmp</strong>"</p>
  
  <p>[1] = "N:\FaceRecProOV - Copy
  (2)\FaceRecProOV\bin\Debug/TrainedFaces/2\ <strong>2.bmp</strong>"</p>
  
  <p>[2] = "N:\FaceRecProOV - Copy
  (2)\FaceRecProOV\bin\Debug/TrainedFaces/3\ <strong>3.bmp</strong>"</p>
  
  <p>[3] = "N:\FaceRecProOV - Copy
  (2)\FaceRecProOV\bin\Debug/TrainedFaces/4\ <strong>4.bmp</strong>"</p>
  
  <p>[4] = "N:\FaceRecProOV - Copy
  (2)\FaceRecProOV\bin\Debug/TrainedFaces/4\ <strong>9.bmp</strong>"</p>
</blockquote>
