Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

VersionControlServer.TryGetWorkspace Method

Gets the workspace for the given path.

Namespace: Microsoft.TeamFoundation.VersionControl.Client
Assembly: Microsoft.TeamFoundation.VersionControl.Client (in microsoft.teamfoundation.versioncontrol.client.dll)

public Workspace TryGetWorkspace (
	string localPath
public Workspace TryGetWorkspace (
	String localPath
public function TryGetWorkspace (
	localPath : String
) : Workspace



A local path for which a workspace is desired.

This is similar to GetWorkspace. However, if the path is not in any known local workspace, TryGetWorkspace returns a null reference (Nothing in Visual Basic) instead of throwing an exception.

Community Additions

© 2015 Microsoft