I have created a series of typed DataSets (MyDataSet1, MyDataSet2, etc.) that will be used in a new method I am writing. The method receives, as one of its parameters, the name of one of these typed DataSets. Does anyone know how to dynamically create a DataSet from a variable value in C#? More clearly, if a variable is holding the value "MyDataSet2" how can I create a DataSet of type MyDataSet2
(ie., MyDataSet2 ds = New MyDataSet2() vs. varvalue ds = New varvalue() ) using the variable instead of hard coding the word MyDataSet2. I can use a switch/case statement to check for each possible value of the variable and simply execute the appropriate statement but I want to make it more dynamic so that as new types are created or removed I don't have to also edit the switch/case statement. --- You are currently subscribed to dotnet as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] --------- Administrated by 15 Seconds : http://www.15Seconds.com List Archives/Search : http://local.15Seconds.com/search Subscription Information : http://www.15seconds.com/listserv.htm Advertising Information: http://www.internet.com/mediakit/
