Hi Team,
Can anyone please provide the code snippet to disconnect the Team Foundation Server though C# code.
public void connectToTFS(String URL){
try
{
Console.WriteLine("establishing connection to TFS . . .");
MessageBox.Show("establishing connection to TFS . . .");
tfsUri = new Uri(URL);
tpc = new TfsTeamProjectCollection(tfsUri);
Console.WriteLine("connection established to TFS successfully!");
MessageBox.Show("Connection established to TFS successfully!");
}
catch (Exception e)
{
Console.WriteLine("Error in connectint to TFS" + e.Message);
}
}
This is code snippet for Connecting TFS through C#. similarly I am looking for disconnecting.