SPContentTypeId.LessThanOrEqual operator
指出是否第一個內容類型識別碼 (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
)
參數
id1
Type: Microsoft.SharePoint.SPContentTypeId第一個兩個內容類型識別碼值的比較。
id2
Type: Microsoft.SharePoint.SPContentTypeId第二個兩個內容類型識別碼值的比較。
傳回值
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
請參閱
參照
Microsoft.SharePoint namespace