In C#: Why no 'Item' on System.Data.DataRow?
问题 I'm rewriting/converting some VB-Code: Dim dt As New System.Data.DataTable() Dim dr As System.Data.DataRow = dt.NewRow() Dim item = dr.Item("myItem") C#: System.Data.DataTable dt = new System.Data.DataTable(); System.Data.DataRow dr = dt.NewRow(); var item = dr.Item["myItem"]; I can't make it run under C#, the problems I have is the third row var item = dr.Item["myItem"]; : System.Data.DataRow' does not contain a definition for 'Item' and no extension method 'Item' accepting a first argument