SecurityTokenRequirement.TryGetProperty<TValue>(String, TValue) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得當前 SecurityTokenRequirement 實例指定的屬性。
public:
generic <typename TValue>
bool TryGetProperty(System::String ^ propertyName, [Runtime::InteropServices::Out] TValue % result);
public bool TryGetProperty<TValue>(string propertyName, out TValue result);
member this.TryGetProperty : string * 'Value -> bool
Public Function TryGetProperty(Of TValue) (propertyName As String, ByRef result As TValue) As Boolean
類型參數
- TValue
參數中要回傳 result 的屬性類型。
參數
- propertyName
- String
要取得的房產名稱。
- result
- TValue
房產中指定的 propertyName 價值。
傳回
true 若該 Properties 屬性包含該屬性中指定的 propertyName 屬性值;否則, false。
例外狀況
存在一個屬性,其名稱 propertyName 在參數中指定,但其類型與參數中指定的 TValue 不同。
備註
要取得指定屬性的屬性值並驗證屬性值是否能設定為參數中 TValue 指定的型別,請呼叫該 GetProperty<TValue>(String) 方法。