fork download
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. var dict = new Dictionary<string, string>();
  9. dict[1.0] = 2;
  10. Console.WriteLine(dict["0"]);
  11. }
  12. }
Compilation error #stdin compilation error #stdout 0.02s 22364KB
stdin
Standard input is empty
compilation info
prog.cs(9,7): error CS1502: The best overloaded method match for `System.Collections.Generic.Dictionary<string,string>.this[string]' has some invalid arguments
/usr/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error)
prog.cs(9,8): error CS1503: Argument `#1' cannot convert `double' expression to type `string'
Compilation failed: 2 error(s), 0 warnings
stdout
Standard output is empty