[Mono-dev] Compile Mono Solaris

Robert Jordan robertj at gmx.net
Tue Dec 18 17:05:52 EST 2007


Steven Jeffs wrote:
> Same result on ubuntu as well:
> $ cat > test.cs
> using System;
> using System.Collections.Generic;
> using System.Text;
> 
> public class Example
> {
>     public static void Main()
>     {
>         Dictionary<char, byte> widths = new Dictionary<char, byte>();
> 
>         widths.Add((char)0x10, (byte)0x20 );
>         widths.Add((char)0x10, (byte)0x30 );
>     }
> }
> $ gmcs test.cs
> $ mono test.exe
> 
> Unhandled Exception: System.ArgumentException: An element with the same 
> key already exists in the dictionary.

The exception is expected, as you're trying to insert the same
key twice.

Robert




More information about the Mono-devel-list mailing list