SPFileVersionCollection Class
Represents a collection of SPFileVersion objects.
System.Object
Microsoft.SharePoint.Administration.SPAutoSerializingObject
Microsoft.SharePoint.SPBaseCollection
Microsoft.SharePoint.SPFileVersionCollection
Microsoft.SharePoint.Administration.SPAutoSerializingObject
Microsoft.SharePoint.SPBaseCollection
Microsoft.SharePoint.SPFileVersionCollection
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Use the Versions property of the SPFile class to return the collection of versions for a file.
Use an indexer to return a single version from the collection. For example, assuming the collection is assigned to a variable named myVersions, use myVersions[index] in C#, or myVersions(index) in Microsoft Visual Basic, where index is the index number of the version in the collection.
SPListItemVersionCollection and SPFileVersionCollection return different number of versions
Explanation why the SPListItemVersionCollection.Count and SPFileVersionCollection.Count values for the same file are different: http://stackoverflow.com/q/7401633/95
- 9/13/2011
- Marek Grzenkowicz
- 9/13/2011
- Marek Grzenkowicz