title: Is it possible to get the list of all Workitem Types in a Project collection?
body: <p>I am trying to get the list of all the <code>workitem types</code> from <code>project collection</code> without accessing <code>project</code> in <code>project collection</code>.</p>
  
  <p><strong>I have tried till now</strong></p>
  
  <p>I can get the list of all <code>workitemType</code> list using <code>project</code> object as in following code:</p>
  
  <pre><code> TfsTeamProjectCollection tfctc = new TfsTeamProjectCollection(newUri
              ("http://servername:8080/tfs/teamprojectcollection"));
   WorkItemStore wis = tfctc.GetService&lt;WorkItemStore&gt;();
  
   foreach(Project project in wis.Projects)
   {               
     foreach (WorkItemType type in project.WorkItemTypes)
     {
       Console.WriteLine(type.Name);
     }
   }
  </code></pre>
  
  <p>By searching on getting list of <code>WorkitemType</code> I come to know one class in TFS as <a href="https://msdn.microsoft.com/en-us/library/Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemTypeCollection.aspx" rel="nofollow">WorkItemTypeCollection</a>.</p>
  
  <p>but while using it I am not able to get the object of <code>workitemcollection</code> using <code>projectCollection</code>.</p>
  
  <p>I have tried below code to do so:</p>
  
  <pre><code> TfsTeamProjectCollection tfctc = new TfsTeamProjectCollection(newUri
              ("http://servername:8080/tfs/teamprojectcollection"));
   WorkItemTypeCollection witc = tfctc.GetService&lt;WorkItemTypeCollection&gt;(); // here I am getting nil object every time
  // some more code          
  </code></pre>
  
  <p><strong>What I Want to do</strong></p>
  
  <p>I want to get the list of <strong><code>WorkItemTypes</code></strong> in a <code>projectcollection</code>.</p>
  
  <p>Can anyone help me on this?
  Correct me if I am wrong any where.
  Thanks in advance.</p>