DirectoryInfo.FullName : DirectoryInfo « System.IO « C# / C Sharp by API






DirectoryInfo.FullName

 
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using System.IO.Compression;
using System.Text;

public class MainClass
{
    public static void Main()
    {
        DirectoryInfo root = new DirectoryInfo(@"C:\Program Files\");

        DirectoryInfo[] dirs = root.GetDirectories("*", SearchOption.TopDirectoryOnly);
        Console.WriteLine("{0} subdirectories:", root.FullName);
        foreach (DirectoryInfo subDir in dirs)
        {
            Console.WriteLine("    {0}", subDir.Name);
        }

    }
}

   
  








Related examples in the same category

1.new DirectoryInfo(String path)
2.DirectoryInfo.CreateSubdirectory
3.DirectoryInfo.CreationTime
4.DirectoryInfo.Exists
5.DirectoryInfo.GetDirectories()
6.DirectoryInfo.GetFiles()
7.DirectoryInfo.GetFiles(String filter)
8.DirectoryInfo.LastAccessTime
9.DirectoryInfo.LastWriteTime
10.DirectoryInfo.Name
11.DirectoryInfo.Parent