Create a program to display the name (but not the path) of the executable files (.com, .exe, .bat, .cmd) in the current directory
using System; using System.IO; class DisplayExecutableFiles { static void Main() { string[] files = Directory.GetFiles("."); foreach (string file in files) { string extension = Path.GetExtension(file); switch (extension) { case ".exe": case ".com": case ".bat": case ".cmd": Console.WriteLine(file); break; } } } }