Link to home
Start Free TrialLog in
Avatar of maqskywalker
maqskywalker

asked on

casting a datasource into a Sataset in VB.NET

I saw this example:
https://social.msdn.microsoft.com/Forums/vstudio/en-US/53983755-bcdd-4d35-b307-08b370e42f81/copy-datagrid-to-datatable?forum=csharpgeneral

which had this C# code.

DataSet dsDG = new DataSet();
DataTable dt = new DataTable();
//first cast the DataSource into a DataSet
dsDG = (DataSet)MyDataGrid.DataSource;
//then pull the DataTable out of the Dataset
dt = dsDG.Tables[0];


What's the equivalent if these 4 lines in VB?
ASKER CERTIFIED SOLUTION
Avatar of Chinmay Patel
Chinmay Patel
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of maqskywalker
maqskywalker

ASKER

Thanks.