Share via


SPListItem.Item property (Guid)

Gets or sets the value that is contained by the field identified by the specified GUID.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Default Property Item ( _
    fieldId As Guid _
) As Object
    Get
    Set
'Usage
Dim instance As SPListItem
Dim fieldId As Guid
Dim value As Object

value = instance(fieldId)

instance(fieldId) = value
public Object this[
    Guid fieldId
] { get; set; }

Parameters

  • fieldId
    Type: System.Guid

    The GUID that is associated with the field.

Property value

Type: System.Object
An object that contains the field value.

Exceptions

Exception Condition
ArgumentException

The field does not exist.

Remarks

Important

To improve performance and optimize the number of SQL Server queries that SharePoint Foundation must execute, use the GetItems method of the SPList class to retrieve items that are based on the value of their fields. The GetItems method allows you to specify search criteria by passing a Collaborative Application Markup Language (CAML) query through the SPQuery or SPView class. In addition, list performance may be compromised if a list contains an unnecessarily large number of fields.

See also

Reference

SPListItem class

SPListItem members

Item overload

Microsoft.SharePoint namespace