Share via


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)

Syntax

<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public NotInheritable Class SPListItemVersion

Dim instance As SPListItemVersion
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
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