http://bugzilla.novell.com/show_bug.cgi?id=497720
User [email protected] added comment http://bugzilla.novell.com/show_bug.cgi?id=497720#c3 --- Comment #3 from Jonas Larsson <[email protected]> 2009-04-23 12:07:59 MDT --- It's so obvious when you say it. I'm embarrassed. I actually thought I was helping by being so specific. I was about to post patches, but I won't now. Lesson learned the hard way :-( I will shape up in the future. Test case: using System.Collections.Generic; using System; class Program { static void Main(string[] args) { SortedDictionary<int, int> dict = new SortedDictionary<int, int>(); try { int[] keysArray = new int[dict.Count]; dict.Keys.CopyTo(keysArray, 0); Console.Out.WriteLine("No error copying the keys"); } catch (Exception ex) { Console.Error.WriteLine("Copy keys exception : " + ex.GetType().FullName); } try { int[] valuesArray = new int[dict.Count]; dict.Values.CopyTo(valuesArray, 0); Console.Out.WriteLine("No error copying the values"); } catch (Exception ex) { Console.Error.WriteLine("Copy values exception : " + ex.GetType().FullName); } } } Run on Mono: $ mono Test.exe Copy keys exception : System.ArgumentOutOfRangeException Copy values exception : System.ArgumentOutOfRangeException Run on .NET Copy keys exception : System.ArgumentOutOfRangeException Copy values exception : System.ArgumentOutOfRangeException I really hope this can be of value to you. I have already fixed it myself, but can't submit the patches. Thanks for your great efforts! -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
