http://bugzilla.novell.com/show_bug.cgi?id=623451
http://bugzilla.novell.com/show_bug.cgi?id=623451#c0 Summary: DataColumn.SetOrdinal fails when ordinal is 0 Classification: Mono Product: Mono: Class Libraries Version: 2.6.x Platform: x86 OS/Version: openSUSE 11.2 Status: NEW Severity: Normal Priority: P5 - None Component: Sys.Data AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: Development Blocker: --- Description of Problem: ----------------------- DataColumn.SetOrdinal fails when ordinal is 0 Steps to reproduce the problem: ------------------------------- DataTable t = new DataTable(); t.Columns.Add("one"); t.Columns.Add("two"); t.Columns["two"].SetOrdinal(0); Actual Results: --------------- Unhandled Exception: System.ArgumentOutOfRangeException: Index is less than 0 or more than or equal to the list count. Parameter name: index -1 at System.Collections.ArrayList.ThrowNewArgumentOutOfRangeException (System.String name, System.Object actual, System.String message) [0x00000] in /usr/src/packages/BUILD/mono-2.6.4/mcs/class/corlib/System.Collections/ArrayList.cs:3261 at System.Collections.ArrayList.get_Item (Int32 index) [0x00013] in /usr/src/packages/BUILD/mono-2.6.4/mcs/class/corlib/System.Collections/ArrayList.cs:2652 at System.Data.DataColumnCollection.MoveColumn (Int32 oldOrdinal, Int32 newOrdinal) [0x00078] in /usr/src/packages/BUILD/mono-2.6.4/mcs/class/System.Data/System.Data/DataColumnCollection.cs:720 at System.Data.DataColumn.SetOrdinal (Int32 ordinal) [0x00017] in /usr/src/packages/BUILD/mono-2.6.4/mcs/class/System.Data/System.Data/DataColumn.cs:586 at datacol.MainClass.Main (System.String[] args) [0x00032] in /home/rupert/Projects/datacol/datacol/Main.cs:14 The application was terminated by a signal: SIGHUP Expected Results: ----------------- Column "two" should move left to become the first column in the table How often does this happen? --------------------------- Every time Additional Information: ----------------------- The above code works fine on Visual C# Express 2008 on Windows. -- 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
