Partilhar via


SPSite.QueryFeatures Method (Guid, Version)

Gets a collection of the features deployed in this site collection that have a specific definition identifier and a specific version.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Function QueryFeatures ( _
    featureId As Guid, _
    featureVersion As Version _
) As SPFeatureQueryResultCollection
'Usage
Dim instance As SPSite
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

  • featureVersion
    Type: System.Version

    The value of the Version property of an SPFeature object. Only features that have this version number are included.

Return Value

Type: Microsoft.SharePoint.SPFeatureQueryResultCollection
An enumerable collection of SPFeature objects.

See Also

Reference

SPSite Class

SPSite Members

QueryFeatures Overload

Microsoft.SharePoint Namespace