fork download
  1. using System;
  2. using System.Runtime.CompilerServices;
  3. using System.Runtime.CompilerServices.DynamicAttribute;
  4.  
  5. public class Test
  6. {
  7. public static void Main()
  8. {
  9. // your code goes here
  10.  
  11. /*Save<string, int>("hello", 4);
  12. Save<string>("Hello", 6);
  13. Save("Good bye", 1);*/
  14.  
  15. SaveD("hello", 4);
  16. }
  17.  
  18. public static void SaveD(dynamic a, dynamic b)
  19. {
  20. Console.WriteLine("T: " + a.ToString());
  21. Console.WriteLine("U: " + b.ToString());
  22. }
  23.  
  24. public static void SaveD(dynamic a, int b)
  25. {
  26. Console.WriteLine("Special T: " + a.ToString());
  27. Console.WriteLine("Specia U: " + b.ToString());
  28. }
  29.  
  30. public static void Save<T, U>(T a, U b)
  31. {
  32. Console.WriteLine("T: " + a.ToString());
  33. Console.WriteLine("U: " + b.ToString());
  34. }
  35.  
  36. public static void Save<T>(T a, int b)
  37. {
  38. Console.WriteLine("Special T: " + a.ToString());
  39. Console.WriteLine("Special U: " + b.ToString());
  40. }
  41. }
Compilation error #stdin compilation error #stdout 0.03s 33880KB
stdin
Standard input is empty
compilation info
prog.cs(3,39): error CS0234: The type or namespace name `DynamicAttribute' does not exist in the namespace `System.Runtime.CompilerServices'. Are you missing an assembly reference?
prog.cs(18,34): error CS1980: Dynamic keyword requires `System.Runtime.CompilerServices.DynamicAttribute' to be defined. Are you missing System.Core.dll assembly reference?
prog.cs(18,45): error CS1980: Dynamic keyword requires `System.Runtime.CompilerServices.DynamicAttribute' to be defined. Are you missing System.Core.dll assembly reference?
prog.cs(24,34): error CS1980: Dynamic keyword requires `System.Runtime.CompilerServices.DynamicAttribute' to be defined. Are you missing System.Core.dll assembly reference?
Compilation failed: 4 error(s), 0 warnings
stdout
Standard output is empty