title: How to get Content Type by Name or ID?
body: <p>I'm trying to get a Content Type by the Name or the ID.</p>
  
  <p>I'm using this code but it does not work.</p>
  
  <pre><code>SPContentTypeId eventTypeId = new SPContentTypeId("0x0102"); 
  SPContentType eventType = web.AvailableContentTypes[eventTypeId];
  </code></pre>
  
  <p>Do you have any ideas?</p>
  
  <p>Thanks.</p>