Hi,
I have a general all purpose class that can take the name of a stored
procedure and return a dataset...
This general dataset that is returned I wish to cast to a strongly typed
dataset of my choosing.
I have the XML Schema and a generated specialization of the DataSet that I
wan´t to cast to...
Generated by xsd.exe
public class MyStronglyTypedDS : DataSet {
....
}
My app code: (wich causes Invalid Cast Exception...)
MyStronglyTypedDS ds = (MyStronglyTypedDS) obj.GetDataSet("MyStoredProc");
My DAL code:
public DataSet GetDataSet(string sproc) {
....
return ds;
}
I would rely appreciate some feedback!
Thanks
/Oscar