BelhardTraining.LessonIO.Program.PrintDriveLetters C# (CSharp) Méthode

PrintDriveLetters() static private méthode

static private PrintDriveLetters ( ) : void
Résultat void
        static void PrintDriveLetters()
        {
            // Функция Directory.GetLogicalDrives() возращает массив
            //		с элементами вида "C:\", "D:\", "E:\" и т.д.
            string[] driveLetters = Directory.GetLogicalDrives();
            foreach (string driveLetter in driveLetters)
            {
                Console.WriteLine(driveLetter);
            }
        }