SPContentTypeId.Equality 运算符

指示两个指定的内容类型标识符 (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接口。此方法可实现相等运算符。调用方法,使用equality运算符对两个SPContentTypeId对象,如下面的示例中所示。

SPContentTypeId x = SPBuiltInContentTypeId.Item;
SPContentTypeId y = x;
Console.WriteLine(x == y); // True
Dim x As SPContentTypeId = SPBuiltInContentTypeId.Item
Dim y As SPContentTypeId = x
Console.WriteLine(x Is y) ' True

另请参阅

引用

SPContentTypeId 结构

SPContentTypeId 成员

Microsoft.SharePoint 命名空间

其他资源

Content Type IDs

Introduction to Content Types

Site and List Content Types

Base Content Type Hierarchy