SPContentTypeId.LessThanOrEqual Operator

Indicates whether the first content type identifier (ID) is less than or equal to the second content type ID.

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

Return Value

Type: System.Boolean
true if the first value is less than or equal to the second; otherwise, false.

Remarks

The SPContentTypeId structure implements the IComparable interface. This method implements the <= operator. To call the method, use the operator with two SPContentTypeId objects, as shown in the following example.

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

See Also

Reference

SPContentTypeId Structure

SPContentTypeId Members

Microsoft.SharePoint Namespace

Other Resources

Content Type IDs

Introduction to Content Types

Site and List Content Types

Base Content Type Hierarchy