UnknownObjectAccessor.TryGetProperty<T> Method (String, T) |
Gets the value of a named property for the current UnknownObjectAccessor.
Namespace: PostSharp.Patterns.Utilities
Assembly: PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 2023.0.3.0 (2023.0.3.0)
C#
public bool TryGetProperty<T>( string name, out T value )
Parameters
- name
- Type: System.String
Property name. - value
- Type: T
Returns the property value if a property named name exists and its value can be cast to T, otherwise default.
Type Parameters
- T
- Type of the property value.
Return Value
Type: Booleantrue if the property value if a property named name exists and its value can be cast to T, otherwise false.