This documentation is archived and is not being maintained.

VersionControlServer.GetItem Method (Int32, Int32)

Every file and folder on the server that is running Team Foundation Server has a unique ID assigned. This method allows you to get an Item object for an old version of a file or folder, based on the changeset that version was part of. If the item cannot be found, null is returned. Download information is not included in this method. The function call is faster without the download information, but if you want to download files, you should use one of the overload methods that will allow you to get download information with the returned items.

Namespace:  Microsoft.TeamFoundation.VersionControl.Client
Assembly:  Microsoft.TeamFoundation.VersionControl.Client (in Microsoft.TeamFoundation.VersionControl.Client.dll)

public Item GetItem(
	int itemId,
	int changesetNumber


Type: System.Int32

A unique ID of the file or folder that you want to get.

Type: System.Int32

A changeset that included this version.

Return Value

Type: Microsoft.TeamFoundation.VersionControl.Client.Item
Returns the Item if the Item was found, otherwise it is null.