Table of Contents

Method GetFirstMember

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

GetFirstMember(Type?, string, MemberTypes, BindingFlags)

Gets field or property information using the specified object type (or instance) and property name. Type of the object or the object itself must be specified.

public static MemberInfo? GetFirstMember(Type? type, string propName, MemberTypes memberTypes = MemberTypes.Field | MemberTypes.Property, BindingFlags bindingFlags = BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic)

Parameters

type Type

Type of the object with the property.

propName string

Property name.

memberTypes MemberTypes

Specifies member types to search. Optional. By default searches for the fields and properties.

bindingFlags BindingFlags

Specifies binding flags used when member is searched. Optional.

Returns

MemberInfo