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
属性的值。