13
Answers

Sort Out List Box by Modified Date.

Feroz Khan

Feroz Khan

7y
832
1
in below file is showing from a directroy file but not sort out I need sort out by modified date.
please help me about this... thanks.
  1. private void Receipts_Load(object sender, EventArgs e)  
  2. {  
  3.     try  
  4.     {  
  5.         string[] files = Directory.GetFiles(path);  
  6.   
  7.         foreach (string file in files)  
  8.         {  
  9.             show_receipts_listbox.Items.Add(Path.GetFileName(file));  
  10.         }  
  11.                 
  12.     }  
  13.     catch(Exception ex)  
  14.     {  
  15.         MessageBox.Show(ex.Message, "Error");  
  16.     }  
  17. }  

Answers (13)