SPContentTypeId.LessThan 运算符

指示第一个内容类型标识符 (ID) 是否小于第二个内容类型 id。

命名空间:  Microsoft.SharePoint
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
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
)

参数

返回值

类型: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 结构

SPContentTypeId 成员

Microsoft.SharePoint 命名空间

其他资源

Content Type IDs

Introduction to Content Types

Site and List Content Types

Base Content Type Hierarchy