Advertisement
Gillito

Untitled

Jun 18th, 2015
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.86 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.IO;
  7.  
  8. namespace ConsoleApplication51
  9. {
  10.     class Program
  11.     {
  12.         static void Main(string[] args)
  13.         {
  14.             DriveInfo[] allDrives = DriveInfo.GetDrives();
  15.             int i=1;
  16.             foreach (DriveInfo d in allDrives)
  17.                 Console.WriteLine("{0}) Drive {1}", i++, d.Name);
  18.  
  19.             int usrChoise = int.Parse(Console.ReadLine());
  20.  
  21.             if (usrChoise == 3)
  22.             {
  23.                 string[] files = Directory.GetFiles("e:\\Music", "*.mp3", SearchOption.AllDirectories);
  24.  
  25.                 foreach (string item in files)
  26.                     Console.WriteLine(item);
  27.             }
  28.             else Console.WriteLine("ну тогда пошел нахер");
  29.         }
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement