Quantcast
Channel: Team Foundation Server - General forum
Viewing all articles
Browse latest Browse all 6687

Disconnect the Team Foundation Server through C# code

$
0
0

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.



Viewing all articles
Browse latest Browse all 6687

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>