I am rewriting / converting VB code:
Dim dt As New System.Data.DataTable() Dim dr As System.Data.DataRow = dt.NewRow() Dim item = dr.Item("myItem")
FROM#:
System.Data.DataTable dt = new System.Data.DataTable(); System.Data.DataRow dr = dt.NewRow(); var item = dr.Item["myItem"];
I canβt get it to work under C #, the problems I have is the third line var item = dr.Item["myItem"]; :
System.Data.DataRow' does not contain a definition for 'Item' and no extension method 'Item' accepting a first argument of type 'System.Data.DataRow' could be found (are you missing a using directive or an assembly reference?)
I referenced System.Data Version 4 in both projects. What am I missing here? Note: ItemArray exists in both ...
sl3dg3
source share