Reputation: 451
How can I get the version number of an selected item (Component/Page)
I am using the below code
VersionedItemData verinfo=csClient.Read(<selecteditemid>, new ReadOptions())
as VersionedItemData;
<selecteditemid> = Component/Page id
Upvotes: 4
Views: 182
Reputation: 13483
Version
and Revision
properties are available in FullVersionInfo
, so you have to cast VersionInfo
of your item:
((FullVersionInfo) verinfo.VersionInfo).Version
Upvotes: 11
Reputation: 918
VersionItemData.VersionInfo.Version will return you the latest version number.
Upvotes: 1