共用方式為


SPSiteSubscriptionSettings.TryGetAdminProperty Method (String, Boolean)

Returns the administrative property that is associated with the specified key and assigns the value to a variable of type Boolean.

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

Syntax

'Declaration
Public Function TryGetAdminProperty ( _
    key As String, _
    <OutAttribute> ByRef value As Boolean _
) As Boolean
'Usage
Dim instance As SPSiteSubscriptionSettings
Dim key As String
Dim value As Boolean
Dim returnValue As Boolean

returnValue = instance.TryGetAdminProperty(key, _
    value)
public bool TryGetAdminProperty(
    string key,
    out bool value
)

Parameters

  • key
    Type: System.String

    A string that contains the property key corresponding to a value.

  • value
    Type: System.Boolean

    A reference to a variable to receive a Boolean value. If key is not found, value is initialized to default(bool).

Return Value

Type: System.Boolean
Boolean
true if the specified key is found; otherwise, false.

Exceptions

Exception Condition
InvalidCastException

The stored type and the requested type are not compatible.

See Also

Reference

SPSiteSubscriptionSettings Class

SPSiteSubscriptionSettings Members

TryGetAdminProperty Overload

Microsoft.SharePoint Namespace