UtilReflectionGetPropertyT(String, BindingFlags) Method

Searches for the specified property in the specified type.

Definition

Namespace: DevCase.Core.Diagnostics.Assembly.Reflection
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static PropertyInfo GetProperty<T>(
	string propName,
	BindingFlags bindingFlags = BindingFlags.Instance|BindingFlags.Static|BindingFlags.Public|BindingFlags.NonPublic|BindingFlags.FlattenHierarchy|BindingFlags.GetProperty
)

Parameters

propName  String
The name of the property to search for.
bindingFlags  BindingFlags  (Optional)
Flags that controls binding and the way in which the search for members and types is conducted by Reflection.

Type Parameters

T
The source type to search for the property.

Return Value

PropertyInfo
A PropertyInfo instance that represents the obtained property.

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

Exceptions

ArgumentException Property not found using the current flags.

See Also