Isidro Padilla

Isidro Padilla

  • 1.4k
  • 319
  • 19.5k

Who knows about collections?

Aug 26 2011 1:26 PM

namespace Tripolis
{
using System;
using System.CodeDom.Compiler;
using System.Collections;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Data;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;

[Serializable, ToolboxItem(true), DesignerCategory("code"), XmlSchemaProvider("GetTypedDataSetSchema"), HelpKeyword("vs.data.DataSet"), GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), XmlRoot("StoredProcedureCreation")]
public class DataSet2 : DataSet
{
private SchemaSerializationMode Campo1;
private DataTable4 Campo2;
private DataTable3 Campo3;
private DataTable2 Campo4;

[DebuggerNonUserCode]
public DataSet2()
{
this.Campo1 = SchemaSerializationMode.IncludeSchema;
base.BeginInit();
this.Clase6();
CollectionChangeEventHandler handler = new CollectionChangeEventHandler(this.Clase2);
base.Tables.CollectionChanged += handler;
base.Relations.CollectionChanged += handler;
base.EndInit();
}

protected DataSet2(SerializationInfo _paramentro1, StreamingContext Parametro2) : base(parametro1, paramentro2, false)
{
this.Campo1 = SchemaSerializationMode.IncludeSchema;

:
:
:
}

[Serializable, XmlSchemaProvider("GetTypedTableSchema"), DefaultMember("Item"), GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
public class DataTable1 : DataTable, IEnumerable
{
private DataSet2.MulticastDelegate8 Campo1;
private DataSet2.MulticastDelegate8 Campo2;
private DataSet2.MulticastDelegate8 Campo3;
private DataSet2.MulticastDelegate8 Campo4;

:
:
:
}


[Serializable, XmlSchemaProvider("GetTypedTableSchema"), DefaultMember("Item"), GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
public class DataTable2 : DataTable, IEnumerable
{
private DataSet2.MulticastDelegate6 Campo1;
private DataSet2.MulticastDelegate6 Campo2;
private DataSet2.MulticastDelegate6 Campo3;
private DataSet2.MulticastDelegate6 Campo4;

:
:
:
}

[Serializable, XmlSchemaProvider("GetTypedTableSchema"), DefaultMember("Item"), GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
public class DataTable3 : DataTable, IEnumerable
{
private DataSet2.MulticastDelegate7 Campo1;
private DataSet2.MulticastDelegate7 Campo2;
private DataSet2.MulticastDelegate7 Campo3;
private DataSet2.MulticastDelegate7 Campo4;

:
:
:
}

[Serializable, DefaultMember("Item"), XmlSchemaProvider("GetTypedTableSchema"), GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
public class DataTable4 : DataTable, IEnumerable
{
private DataSet2.MulticastDelegate8 Campo1;
private DataSet2.MulticastDelegate8 Campo2;
private DataSet2.MulticastDelegate8 Campo3;
private DataSet2.MulticastDelegate8 Campo4;

:
:
:
}
}
}
ooooooooooooooooooOOOOOOOOOOOOOOOOOOOOOOOOooooooooooooo


I can not compile this code because the compiler sends me the following error:

Error: 'Tripolis.DataSet1.DataTable1' does not implemented interface member 'System.Collections.IEnumerable.GetEnumerator ()'
C: \ Course \ Tripolis \ DataSet1.cs

This error is generated by the compiler in the 4 following lines:

DataTable1 public class: DataTable, IEnumerable
DataTable2 public class: DataTable, IEnumerable
DataTable3 public class: DataTable, IEnumerable
DataTable4 public class: DataTable, IEnumerable


I hope someone help me correct this error. I'm learning and do not understand the issue of "colletions."
Thank you
ipadillar


Translated into Spanish:

No logro la compilación de este código porque que el compilado me envía el siguiente error:

Error:'Tripolis.DataSet1.DataTable1' does not implement interface member 'System.Collections.IEnumerable.GetEnumerator()'
C:\Curso\Tripolis\DataSet1.cs


Este error lo genera el compilador en las 4 líneas siguientes:

public class DataTable1 : DataTable, IEnumerable
public class DataTable2 : DataTable, IEnumerable
public class DataTable3 : DataTable, IEnumerable
public class DataTable4 : DataTable, IEnumerable


Espero que alguien me ayude a corregir este error. Estoy aprendiendo y no entiendo bien el tema de las "colletions".
Gracias
ipadillar

Answers (4)