共用方式為


DbPropertyValues.GetValue<TValue>(String) 方法

定義

取得屬性的值,就像使用具索引的屬性 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

屬性的值。

適用於