Advertisement
Guest User

Untitled

a guest
Nov 14th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 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.Numerics;
  7.  
  8. namespace ConsoleApp61
  9. {
  10. class Program
  11. {
  12. static void Main(string[] args)
  13. {
  14.  
  15. string[] input = Console.ReadLine().Split("\\");
  16.  
  17. string text = input[3];
  18.  
  19. string[] split = text.Split('.');
  20.  
  21. string fileName = split[0];
  22. string template = split[1];
  23.  
  24. Console.WriteLine($"File name: {fileName}");
  25. Console.WriteLine($"File extension: {template}");
  26.  
  27. }
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement