>if have an Arraylist filled with structs and the struct is:
>
>public struct myTables
>{
> Type DsType; // Contains the System.Type of the strongly typed dataset
> DataSet Data; // Contains the dataset
>}
>
>// the code that fills the list
>this.List.Add( new MyTables(typeof(MyTable1), MyTable1) );
>
>
>Now i want to get a dataset from this arraylist and cast it to it's base type, how would i do that.
Stephane,
What's the question?
How to retrieve from ArrayList? AFAIK ArrayList is not very much suitable for it, you'd need to know or check which one you wnat looping. Check SortedList where you can put it in key-object pairs and retrieve with a key.
I assume question is not how to cast as it's already a DataSet.
PS: Why such a struct? Something like this would do IMHO (what IDE generates or xsd.exe):
public class myData: DataSet {}
Cetin