語言

SecurityTokenRequirement.GetProperty<TValue>(String) 方法

定義

取得當前 SecurityTokenRequirement 實例指定的屬性。

public:
generic <typename TValue>
 TValue GetProperty(System::String ^ propertyName);
public TValue GetProperty<TValue>(string propertyName);
member this.GetProperty : string -> 'Value
Public Function GetProperty(Of TValue) (propertyName As String) As TValue

類型參數

TValue

你要取得的房產類型。

參數

propertyName
String

要取得的房產名稱。

傳回

TValue

房產的價值。

例外狀況

propertyName 是 null。

備註

GetProperty該方法首先呼叫該TryGetProperty<TValue>(String, TValue)方法,以判斷參數中指定的propertyName屬性是否已被設定。 其次,方法 GetProperty 驗證當回傳屬性值時,該值是否能設定為參數中 TValue 指定的類型。

適用於