Delen via


PropertyValues.TryGetValue<TValue>(String, TValue) Method

Definition

Try to gets the value of the property just like using the indexed property getter but typed to the type of the generic parameter. If property exists it return the value into the out parameter, otherwise the default value of TValue

public virtual bool TryGetValue<TValue> (string propertyName, out TValue value);
abstract member TryGetValue : string * 'Value -> bool
override this.TryGetValue : string * 'Value -> bool
Public Overridable Function TryGetValue(Of TValue) (propertyName As String, ByRef value As TValue) As Boolean

Type Parameters

TValue

The type of the property.

Parameters

propertyName
String

The property name.

value
TValue

The property value if any.

Returns

True if the property exists, otherwise false.

Remarks

See Accessing tracked entities in EF Core for more information and examples.

Applies to