SPContentTypeId.Equality Operator
Indicates whether two specified content type identifiers (IDs) are equal.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Syntax
'Declaration
Public Shared Operator = ( _
id1 As SPContentTypeId, _
id2 As SPContentTypeId _
) As Boolean
'Usage
Dim id1 As SPContentTypeId
Dim id2 As SPContentTypeId
Dim returnValue As Boolean
returnValue = (id1 = id2)
public static bool operator ==(
SPContentTypeId id1,
SPContentTypeId id2
)
Parameters
id1
Type: Microsoft.SharePoint.SPContentTypeIdThe first of two content type ID values to compare.
id2
Type: Microsoft.SharePoint.SPContentTypeIdThe second of two content type ID values to compare.
Return Value
Type: System.Boolean
true if the two values are equal; otherwise false.
Remarks
The SPContentTypeId structure implements the IComparable interface. This method implements the equality operator. To call the method, use the equality operator with two SPContentTypeId objects, as shown in the following example.
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
See Also
Reference
Microsoft.SharePoint Namespace