DbPropertyValues.GetValue<TValue>(String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得屬性的值,就像使用索引屬性 getter 一樣,但型別是通用參數的類型。 這對於巢狀字典特別有用,可以避免寫出帶有大量 cast 的表達式。
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
屬性的值。