共用方式為


SPWeb.ContentTypes property

取得網站內容的型別之集合。

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Public ReadOnly Property ContentTypes As SPContentTypeCollection
    Get
'用途
Dim instance As SPWeb
Dim value As SPContentTypeCollection

value = instance.ContentTypes
public SPContentTypeCollection ContentTypes { get; }

Property value

Type: Microsoft.SharePoint.SPContentTypeCollection
SPContentTypeCollection 物件,表示內容類型。

備註

ContentTypes屬性只會傳回存在的型別上目前的網站,並不是所有的內容類型,在目前範圍中。使用AvailableContentTypes屬性來傳回目前的範圍,包括的任何父網站中所有的內容類型。

請參閱

參照

SPWeb class

SPWeb members

Microsoft.SharePoint namespace