Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. public DataTable VerArchivos(DirectoryInfo directorio) {
  2. DataTable dt = new DataTable();
  3. dt.Columns.Add("NombreArchivo");
  4. foreach (FileInfo file in directorio.GetFiles())
  5. {
  6. DataRow row = dt.NewRow();
  7. row["NombreArchivo"] = file.Name;
  8. dt.Rows.Add(row);
  9. }
  10. dt.DefaultView.Sort = "NombreArchivo ASC";
  11. return dt;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement