ContentTypeCollection.GetById Method
Returns the content type with the specified ID from the collection.
Namespace: Microsoft.SharePoint.Client
Assemblies: Microsoft.SharePoint.Client.Silverlight (in Microsoft.SharePoint.Client.Silverlight.dll); Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)
Syntax
'Declaration
<RemoteAttribute> _
Public Function GetById ( _
contentTypeId As String _
) As ContentType
'Usage
Dim instance As ContentTypeCollection
Dim contentTypeId As String
Dim returnValue As ContentType
returnValue = instance.GetById(contentTypeId)
[RemoteAttribute]
public ContentType GetById(
string contentTypeId
)
Parameters
contentTypeId
Type: System.StringA string that contains the content type ID. It must not be a null reference (Nothing in Visual Basic). It must conform to the following ABNF: nonzero-digit = "1" / "2" / "3" / "4" / "5" / "6" / "7" / "8" / "9"digit = "0" / nonzero-digitnonzero-hexdigit = nonzero-digit / "A" / "B" / "C" / "D" / "E" / "F"hexdigit = "0" / nonzero-hexdigitid = *(nonzero-hexdigit hexdigit / "0" nonzero-hexdigit)parentids = *(16(hexdigit hexdigit))contentTypeId = id [ "00" parentids].
Return Value
Type: Microsoft.SharePoint.Client.ContentType
A ContentType object that represents the content type.
Remarks
If a content type with the given identifier is not found in the collection, the server must return a null reference (Nothing in Visual Basic).