fork download
  1. using System;
  2. using System.Globalization;
  3. using System.Linq;
  4. using System.Collections.Generic;
  5.  
  6. public class Test
  7. {
  8.  
  9.  
  10. public static void Main()
  11. {
  12. string _type = "System.Collections.Generic.List<PhilpostDB.ViewModel.Person>";
  13. string result = "";
  14. string[] tokens = _type.Split('<');
  15. result = tokens[0].Split('.').Last();
  16. if (tokens.Length > 1)
  17. {
  18. string token2 = tokens.Last().Split('.').Last();
  19. result = string.Format("{0}<{1}", result, token2);
  20. }
  21. Console.WriteLine(result);
  22. }
  23. }
Success #stdin #stdout 0.02s 33832KB
stdin
Standard input is empty
stdout
List<Person>