[Mono-bugs] [Bug 350432] New: AE when making an ArrayList from a ReadOnlyCollection<>

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Dec 21 15:14:49 EST 2007


           Summary: AE when making an ArrayList from a ReadOnlyCollection<>
           Product: Mono: Class Libraries
           Version: 1.2.6
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: mono-bugs at ximian.com
        ReportedBy: jpobst at novell.com
         QAContact: mono-bugs at ximian.com
          Found By: ---

The following code runs on MS, but throws an ArgumentException on Mono.

using System;
using System.Collections.Generic;
using System.Collections;

public class MainForm
        static void Main ()
                List<String> myarray = new List<string> ();
                ArrayList a = new ArrayList (myarray.AsReadOnly ());


Unhandled Exception: System.ArgumentException: array
(System.Array , Int32 ) [0x00025] in
  at System.Collections.ArrayList.InsertRange (Int32 index, ICollection c)
[0x000d1] in
  at System.Collections.ArrayList.AddRange (ICollection c) [0x00000] in
  at System.Collections.ArrayList..ctor (ICollection c) [0x00047] in
  at MainForm.Main () [0x00000] 

This seems to be a common pattern used by some of the ApplicationServices
classes for VB.Net apps.

Configure bugmail: https://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.

More information about the mono-bugs mailing list