共用方式為


SPWebApplication.QueryFeatures Method (Guid, Version)

Retrieves all features in the current Web application that are scoped to Site or Web and have the specified feature and version identifiers.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Function QueryFeatures ( _
    featureId As Guid, _
    featureVersion As Version _
) As SPFeatureQueryResultCollection
'Usage
Dim instance As SPWebApplication
Dim featureId As Guid
Dim featureVersion As Version
Dim returnValue As SPFeatureQueryResultCollection

returnValue = instance.QueryFeatures(featureId, _
    featureVersion)
public SPFeatureQueryResultCollection QueryFeatures(
    Guid featureId,
    Version featureVersion
)

Parameters

  • featureId
    Type: System.Guid

    Identifier of the features to be retrieved.

  • featureVersion
    Type: System.Version

    Identifier of the version to be retrieved.

Return Value

Type: Microsoft.SharePoint.SPFeatureQueryResultCollection
Returns an SPFeatureQueryResultCollection object that represents all features of a given scope, feature identifier, and version identifier.

See Also

Reference

SPWebApplication Class

SPWebApplication Members

QueryFeatures Overload

Microsoft.SharePoint.Administration Namespace