G
Guest
Hi,
I have a method, which opens a connection, creates an untyped datable, fills it and returns it back.
I have defined a typed datatable in my application as well. For some reasons, I have to call the above mentioned method to get data. Unfortunately, as it returns an untyped datatable, I can't assign my typed datatable variable this value (a base type can't be converted into a sub type automatically).
Without resorting to looping thru the rows and assigning it manually, are there any other procedures so that i could assign the untyped data into my typed datatable? I believe reflection might help.
Thanks in advance!
I have a method, which opens a connection, creates an untyped datable, fills it and returns it back.
I have defined a typed datatable in my application as well. For some reasons, I have to call the above mentioned method to get data. Unfortunately, as it returns an untyped datatable, I can't assign my typed datatable variable this value (a base type can't be converted into a sub type automatically).
Without resorting to looping thru the rows and assigning it manually, are there any other procedures so that i could assign the untyped data into my typed datatable? I believe reflection might help.
Thanks in advance!