http://bugzilla.novell.com/show_bug.cgi?id=497720
Summary: System.Collections.Generic.KeyCollection.CopyTo(TKey
[] array, int arrayIndex) behaves different on Mono /
.NET
Classification: Mono
Product: Mono: Class Libraries
Version: 2.4.x
Platform: i386
OS/Version: Ubuntu
Status: NEW
Severity: Normal
Priority: P5 - None
Component: System
AssignedTo: [email protected]
ReportedBy: [email protected]
QAContact: [email protected]
Found By: ---
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.9)
Gecko/2009042113 Ubuntu/9.04 (jaunty) Firefox/3.0.9
If KeyCollection.Count is 0 (zero, empty) this method always throws
ArgumentOutOfRangeException(). The MS .NET implementation however does not.
Please compare your code with MS using Reflector or other tools.
Mono Code:
if (arrayIndex < 0 || array.Length <= arrayIndex)
throw new ArgumentOutOfRangeException ();
MS Code:
if (index < 0)
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index);
These kind of bugs makes porting .NET code to mono really challenging and
risky.
Reproducible: Always
Steps to Reproduce:
1. Create a Generic keyed collection
2. Call Keys.CopyTo on the empty collection
3. Get exception
Actual Results:
Exception
Expected Results:
Nothing. Copy the keys from an empty collection should do nothing.
--
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