DataRow missing Item Property

joe_pool_is

Well-known member
Joined
Jan 18, 2004
Messages
451
Location
Texas
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?
 
Rats! I figured it out.

For VB:
Code:
Dim row As DataRow
 ...
Dim name As String = row.Item["Name"]
For C#:
Code:
DataRow row;
 ...
string name = row["Name"]
Naturally, Im using C#.

Itd be nice if the help file specified that "Item" was a VB creature. I checked, and it didnt.
 
Back
Top