Author: noaml
Date: 2007-01-04 10:10:28 -0500 (Thu, 04 Jan 2007)
New Revision: 70481

Modified:
   trunk/mcs/class/System.Data/System.Data/XmlTableWriter.cs
Log:
Workaround. Grasshopper currently doesn't support List<T>.ToArray

Modified: trunk/mcs/class/System.Data/System.Data/XmlTableWriter.cs
===================================================================
--- trunk/mcs/class/System.Data/System.Data/XmlTableWriter.cs   2007-01-04 
15:09:08 UTC (rev 70480)
+++ trunk/mcs/class/System.Data/System.Data/XmlTableWriter.cs   2007-01-04 
15:10:28 UTC (rev 70481)
@@ -56,9 +56,13 @@
                        DataSet.WriteStartElement(writer, mode, 
tables[0].Namespace, tables[0].Prefix, XmlHelper.Encode(dataSetName));
 
                        if (mode == XmlWriteMode.WriteSchema) {
+                               DataTable [] _tables = new 
DataTable[tables.Count];
+                               tables.CopyTo(_tables);
+                               DataRelation[] _relations = new 
DataRelation[relations.Count];
+                               relations.CopyTo(_relations);
                                new XmlSchemaWriter(writer,
-                                       tables.ToArray(),
-                                       relations.ToArray(),
+                                       _tables,
+                                       _relations,
                                        mainDataTable,
                                        dataSetName
                                ).WriteSchema();

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to