Directory.GetCurrentDirectory() : Directory « System.IO « C# / C Sharp by API






Directory.GetCurrentDirectory()

  
using System;
using System.IO;

public class DirInfoApp
{
    public static void Main(string[] args)
    {
        DirectoryInfo dir = new DirectoryInfo(Directory.GetCurrentDirectory());
        Console.WriteLine("Current Dir: {0}", dir.FullName);
   
        foreach (FileInfo f in dir.GetFiles())
        {
            Console.WriteLine("{0,-14}{1,10}{2,20}",f.Name, f.Length, f.LastWriteTime);
        }
    }
}

   
    
  








Related examples in the same category

1.Directory.CreationTime
2.Directory.Delete
3.Directory.Exists
4.Directory.GetFiles
5.Directory.GetLogicalDrives
6.Directory.SetCurrentDirectory(String path)