语言

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

属性的值。

适用于