SPListItem object contains two properties which can be used to access valuable information about item versions:
- Versions which returns object of type SPListItemVersionCollection
- File.Versions which returns object of type SPFileVersionCollection
var documentLibrary = site.Lists["mylibrary"] as SPDocumentLibrary; var listItemVersions = list.GetItemById(1); var listItemVersion = listItemVersions.GetVersionFromLabel("2.0"); var title = listItemVersion["Title].toString();Again, simple and easy.
No comments:
Post a Comment