I am having a difficult time getting a list of all versions of a Component.
When I run my code I get the error:
Error 9 foreach statement cannot operate on variables of type 'Tridion.ContentManager.CoreService.Client.FullVersionInfo' because 'Tridion.ContentManager.CoreService.Client.FullVersionInfo' does not contain a public definition for 'GetEnumerator' C:\SYSTFS_WEB_CONTENT_MGMT\CoreService_List_All_Versions\CoreService_List_All_Versions\Program.cs 166 13 CoreService_List_All_Versions
Here is my code:
string arycomp = "tcm:6-19764";
VersionsFilterData versionfilter = new VersionsFilterData();
VersionedItemData versionlist = (VersionedItemData)client.Read(arycomp, new ReadOptions());
var fulverinfo = (FullVersionInfo)versionlist.VersionInfo;
foreach (VersionedItemData allvinfo in fulverinfo)
{
Console.WriteLine(versionlist.Title + " " + fulverinfo.Version);
}