共用方式為


SPFarm.GetPersistedFeatureDefinition method (Guid, Int32)

會傳回**[T:HYPERLINK"https://msdn2.microsoft.com/EN-US/library/ms472446"\t"_blank"Microsoft.SharePoint.Administration.SPFeatureDefinition]物件指定的相容性層級根據featureId參數值。如果指定的compatibilityLevel的找不到[T:HYPERLINK"https://msdn2.microsoft.com/EN-US/library/ms472446"\t"_blank"Microsoft.SharePoint.Administration.SPFeatureDefinition]**物件,則會傳回a null reference (Nothing in Visual Basic) 。

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

Syntax

'宣告
Public Function GetPersistedFeatureDefinition ( _
    featureId As Guid, _
    compatibilityLevel As Integer _
) As SPFeatureDefinition
'用途
Dim instance As SPFarm
Dim featureId As Guid
Dim compatibilityLevel As Integer
Dim returnValue As SPFeatureDefinition

returnValue = instance.GetPersistedFeatureDefinition(featureId, _
    compatibilityLevel)
public SPFeatureDefinition GetPersistedFeatureDefinition(
    Guid featureId,
    int compatibilityLevel
)

參數

  • compatibilityLevel
    Type: System.Int32

    整數,代表 (例如,14 或 15) 的功能相容性層級。

傳回值

Type: Microsoft.SharePoint.Administration.SPFeatureDefinition
[T:HYPERLINK"https://msdn2.microsoft.com/EN-US/library/ms472446"\t"_blank"Microsoft.SharePoint.Administration.SPFeatureDefinition] 物件,代表與指定的相容性層級並 GUID 相關聯的物件。

請參閱

參照

SPFarm class

SPFarm members

GetPersistedFeatureDefinition overload

Microsoft.SharePoint.Administration namespace