fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. Uri u = new Uri("http://stackoverflow.com");
  8. Console.WriteLine(u.Host);
  9. string s = "http://stackoverflow.com";
  10. Console.WriteLine(s.Substring(s.LastIndexOf(@"/") + 1));
  11. }
  12. }
Success #stdin #stdout 0.1s 34304KB
stdin
Standard input is empty
stdout
stackoverflow.com
stackoverflow.com