Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- using System.IO;
- namespace _01.FilterExtensions
- {
- public class FilterExtensions
- {
- public static void Main()
- {
- var files = Directory.GetFiles("input");
- var input = Console.ReadLine();
- foreach (var file in files)
- {
- var currentFile = file.Split(new[] { '\\', '.' }, StringSplitOptions.RemoveEmptyEntries).ToList();
- if (input == currentFile[currentFile.Count - 1])
- {
- Console.WriteLine(string.Join(".", currentFile));
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement