DbPropertyValues.GetValue<TValue>(String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得屬性的值,就像使用具索引的屬性 getter 一樣,但是具有泛型參數的型別。 這對於巢狀字典特別實用,可避免撰寫具有許多轉換的運算式。
public TValue GetValue<TValue> (string propertyName);
member this.GetValue : string -> 'Value
Public Function GetValue(Of TValue) (propertyName As String) As TValue
類型參數
- TValue
屬性的類型。
參數
- propertyName
- String
屬性的名稱。
傳回
TValue
屬性的值。