Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public DataTable VerArchivos(DirectoryInfo directorio) {
- DataTable dt = new DataTable();
- dt.Columns.Add("NombreArchivo");
- foreach (FileInfo file in directorio.GetFiles())
- {
- DataRow row = dt.NewRow();
- row["NombreArchivo"] = file.Name;
- dt.Rows.Add(row);
- }
- dt.DefaultView.Sort = "NombreArchivo ASC";
- return dt;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement