共用方式為


SPContentTypeId.LessThan operator

會指出第一個內容類型識別碼 (ID) 是否比第二個內容輸入 id。

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

Syntax

'宣告
Public Shared Operator < ( _
    id1 As SPContentTypeId, _
    id2 As SPContentTypeId _
) As Boolean
'用途
Dim id1 As SPContentTypeId
Dim id2 As SPContentTypeId
Dim returnValue As Boolean

returnValue = (id1 < id2)
public static bool operator <(
    SPContentTypeId id1,
    SPContentTypeId id2
)

參數

傳回值

Type: System.Boolean
true如果第一個值小於第二個 ;否則,請false。

備註

SPContentTypeId結構實作IComparable介面。此方法會實作<運算子。若要呼叫此方法,使用運算子具有兩個SPContentTypeId物件,如下列範例所示。

SPContentTypeId x = SPBuiltInContentTypeId.BasicPage;
SPContentTypeId y = SPBuiltInContentTypeId.Document;
Console.WriteLine(x < y); // False
Dim x As SPContentTypeId = SPBuiltInContentTypeId.BasicPage
Dim y As SPContentTypeId = SPBuiltInContentTypeId.Document
Console.WriteLine(x < y) ' False

請參閱

參照

SPContentTypeId structure

SPContentTypeId members

Microsoft.SharePoint namespace

其他資源

Content Type IDs

Introduction to Content Types

Site and List Content Types

Base Content Type Hierarchy