SPSiteSubscriptionSettings.TryGetProperty method (String, Boolean)
傳回與指定的索引鍵相關聯,並將值指派給變數的型別Boolean的屬性值。
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Function TryGetProperty ( _
key As String, _
<OutAttribute> ByRef value As Boolean _
) As Boolean
'用途
Dim instance As SPSiteSubscriptionSettings
Dim key As String
Dim value As Boolean
Dim returnValue As Boolean
returnValue = instance.TryGetProperty(key, _
value)
public bool TryGetProperty(
string key,
out bool value
)
參數
key
Type: System.String字串,包含對應到值的屬性索引鍵。
value
Type: System.Boolean用來接收Boolean值的變數參考。如果找不到key , value會初始化為default(bool)。
傳回值
Type: System.Boolean
true如果找不到指定的索引鍵 ;否則, false。
Exceptions
Exception | Condition |
---|---|
InvalidCastException | 預存的型別和要求的型別是不相容。 |
請參閱
參照
SPSiteSubscriptionSettings class
SPSiteSubscriptionSettings members