Click or drag to resize

ExtensionsReflectionGetPropertyFromPath Method

Tries to find a property defined by a path

Namespace:  Cauldron
Assembly:  Cauldron.Activator (in Cauldron.Activator.dll) Version: 3.2.0.1 (3.2.0.1)
Syntax
C#
public static PropertyInfo GetPropertyFromPath(
	this Type type,
	string path,
	BindingFlags bindingFlags = BindingFlags.Instance|BindingFlags.Static|BindingFlags.Public
)

Parameters

type
Type: SystemType
The Type that contains the property
path
Type: SystemString
The path of the property
bindingFlags (Optional)
Type: System.ReflectionBindingFlags
A bitmask comprised of one or more BindingFlags that specify how the search is conducted.

Return Value

Type: PropertyInfo
An object representing the public property with the specified name, if found; otherwise, null.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Type. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptiontype is null
ArgumentNullExceptionpath is null
See Also