joe_pool_is Posted January 30, 2008 Posted January 30, 2008 Using VS2005 Pro, the *Help says the DataRow has an Item Property that is supported in the .NET Framework 2.0, 1.1, and 1.0. *Reference: ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.NETDEVFX.v20.en/cpref4/html/O_T_System_Data_DataRow_Item.htm) However, whenever I try to index a row by its Item, I get an error. The compiler says:Error 1 'System.Data.DataRow' does not contain a definition for 'Item' What happened to the Item Property? Do you have this on your version? Quote Avoid Sears Home Improvement
joe_pool_is Posted January 30, 2008 Author Posted January 30, 2008 Rats! I figured it out. For VB:Dim row As DataRow ' ... Dim name As String = row.Item["Name"]For C#:DataRow row; ' ... string name = row["Name"]Naturally, I'm using C#. It'd be nice if the help file specified that "Item" was a VB creature. I checked, and it didn't. Quote Avoid Sears Home Improvement
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.