Access alternate versions of an item
Each item can contain multiple languages. Each language can contain multiple versions. You can use the Sitecore.Data.Version class to specify a version when accessing an item by using the Sitecore.Data.Database.GetItem() method. For example, to access the first version of the /Sitecore/Content/Home item in the Master database in the default en language:
To access the second version of the /Sitecore/Content/Home item in the Master database in the default en language:
If you do not specify a version, Sitecore uses the current version by default.
You can access the identifier of a version using the Sitecore.Data.Items.Version.Number property. For example, to access the version number of the /Sitecore/Content/Home item in the Master database:
You can use the Sitecore.Data.Items.Item.Versions.Count property to determine if any versions of an item exist for a language. You can use the Sitecore.Data.Items.Item.Versions.GetVersions() method to access all versions of an item in a language. For example, to access all versions in each language of the /Sitecore/Content/Home item in the Master database: