共用方式為


SPQuery.ViewFieldsOnly property

取得或設定值,這個值,指出是否要擷取的ViewFields屬性中指定的欄位。

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Public Property ViewFieldsOnly As Boolean
    Get
    Set
'用途
Dim instance As SPQuery
Dim value As Boolean

value = instance.ViewFieldsOnly

instance.ViewFieldsOnly = value
public bool ViewFieldsOnly { get; set; }

Property value

Type: System.Boolean
傳回指定為ViewFields; 欄位的true否則, false。

備註

當您藉由設定ViewFields屬性指定欄位時,查詢會擷取不只是這些欄位的資料。若要最佳化效能,您可以限制查詢所傳回的ViewFieldsOnly屬性設定為true的資料。

請參閱

參照

SPQuery class

SPQuery members

Microsoft.SharePoint namespace