fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. f1(typeof(string));
  8. f2<string>();
  9. }
  10.  
  11. private static void f1(Type t)
  12. {
  13. Console.WriteLine(t.Name);
  14. }
  15.  
  16. private static void f2<T>()
  17. {
  18. var t = typeof(T);
  19. Console.WriteLine(t.Name);
  20. }
  21. }
Success #stdin #stdout 0.01s 131712KB
stdin
Standard input is empty
stdout
String
String