SPListItemVersion Class

Represents a version of a list item.

Inheritance Hierarchy

System.Object
  Microsoft.SharePoint.SPListItemVersion

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
<SubsetCallableTypeAttribute> _
Public NotInheritable Class SPListItemVersion
'Usage
Dim instance As SPListItemVersion
[SubsetCallableTypeAttribute]
public sealed class SPListItemVersion

Remarks

Use the Versions property of the SPListItem class to return the collection of versions for a list item. If versioning is enabled on a list, each time you modify an item a version is created.

Use an indexer to return a single version from the collection. For example, if the collection is assigned to a variable named myListItemVersions, use myListItemVersions[index] in C#, or myListItemVersions(index) in Visual Basic, where index is the index number of the version in the collection.

To return a specific column value for a list item version, use an indexer on the version. For example, use myItemVersion[index], or myItemVersion(index) in Visual Basic, where index is either the index number of the field in the collection of fields associated with the list, or the name of the field.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

SPListItemVersion Members

Microsoft.SharePoint Namespace