Skip to main content

Posts

Showing posts from September 27, 2011

Object Model SPListItem Class

You can use an indexer to return a single item from a list item collection. For example, if the collection is assigned to a variable named  collListItems , use  collListItems[ index ]  in Microsoft C#, or  collListItems( index )  in Microsoft Visual Basic, where  index  is the index number of the item in the collection, or the internal name or display name of a list field. For an indexer based on a name, Microsoft SharePoint Foundation first looks for the field by internal name and then by display name. To assign values to a field in a list item using an indexer, the values must be represented in a format that is appropriate for each built-in field type. The following table shows how the data types that are used in SharePoint Foundation field types map to Microsoft .NET Framework types. Name Format Attachments System.Boolean Boolean System.Boolean Calculated N/A Choice System.String Computed N/A Counter Syste...